Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 1.72 KB

c2.md

File metadata and controls

29 lines (20 loc) · 1.72 KB

Chapter 2: YOLOL fundamentals

To get you started on how this site does YOLOL, first let me give you an introduction to the tool we will be using throughout.

Code snippets

To get behind YOLOL-things I've teamed up with Azurethi(#0789) (the brain behind ISANv2) to use his interpreter for interactive code snippets which you can run and edit to your heart's content! A little preview can be seen below containing a first few lines of valid YOLOL. Either step through each line separately or have it run each line automatically by trying out the buttons in the snippet.

SNIPPET

a=1
b=2
c=a*b

The values a, b and c are set upon running each respective line as can be seen in the "Output Fields" tab on the right of the snippet.
As of now, the "auto-play" executes each line at an interval of 0.2 seconds, which is also the time it takes in-game YOLOL to execute.

The above snippet only shows 3 lines of code however can be extended up to 20. The currently active line (the line that will be executed next) will always wrap around upon executing the last line, regardless of line count.

You can also set the active line manually by clicking on the line-labels on the left of the snippet!

YOLOL limitations

To this day YOLOL is restricted to 20 lines of code in one chip, each consisting of max 70 characters.
To make testing around a bit more easy I have removed the limitation on possible characters per line, however kept the limitation on total line count.
Keep in mind that YOLOL code disregarding those limitations will not work ingame!

With that cleared, let's jump into actually writing some stuff!

Previous Chapter Next Chapter