OALS Level Format
For those of you who want to know how the levels are formatted in the text file or if you don't want to use the editor, this is for you. In this post I will be breaking down the language of the .oals.
To start, there text file is reedlike a string of commands. It starts with the first line and iterates though the entire text file, creating or loading the entities as needed. Each command is composed of a 3 parts: modifiers, type, and parameters/arguments. Each command must consist of these three things in that order, modifiers first, type second, and lastly parameters. Each command should be separated by a new line, and modifiers, types, and arguments should all be separated by spaces.
Currently there are two modifiers in place, which is the asterisk(*) and no modifiers. The asterisk is for level declarations. These should be put in the beginning of the level so that they will be read first. No modifiers indicate that an entity should be created.
Types describe what the command is supposed to do. For asterisk modifiers, these are like variables in which arguments can be assigned. For no modifiers, the type describes what entity should be created. The type must always come be stated before the arguments.
Finally, arguments describe the finer details of what should be created. Arguments themselves are separated with spaces in between them. Since commands have different arguments for different purposes, each argument is composed of a single letter identifier and a number. Arguments that are not defined will be defined as 0. The identifier can be before or after the number, as long as it is not separated by a space. Here is a list of argument types that can be used. There is no specific order to which arguments can be written in, as long as they are separated by a space and have the appropriate indicator
Level Argument Identifiers
- s - string/text
- w - the width of the level
- h - the height of the level
Entity Argument Identifiers
- x - where to create the entity on the x axis
- y - where to create the entity on the y axis
- t - which team the entity should be assigned to
- r - what angle is the entity rotated at, in degrees, starting from the positive x axis(think unit circle)
Finally here is a list of the different commands that can be used. Arguments are shown after the type. The types themselves are pretty self explanatory.
- *name s
- *author s
- *size w h
Entity Commands - all entity commands take the x y r t arguments
As each update comes out, I will keep this post updated with the latest types and arguments. Have fun editing!
Get Only A Lab Slime
Leave a comment
Log in with itch.io to leave a comment.