julia script that turns a set of instructions into a playable celeste map
- a modded version of the celeste client
- EmHelper
- Julia on your fav. code editor (while installing julia, check add path!)
- Maple
- JSON
Walke- is an esoteric programming language made to simplify the process of "coding" in celeste, using the entities in my helper. I wrote this script to eventually code Conway's game of life in the game, to prove that this language is turing complete. This script compiles the code into a celeste map, that should be able to do simple logic operations.
-
Walke- uses 6-digits hex codes (#FFFFFF) as bool variables (the only supported type!), each color can assume a "on/off" state in-game
for example, if #FF0000 is on, and #00FF00 is off, #FF0000 AND #00FF00 = #0000FF sets #0000FF off
-
each instruction is always active, contrasting instructions create weird bugs
-
the language is not CaSe SeNsItIvE
-
walke- supports multiple outputs per instruction, separated by a
,
-
each line can only contain one instruction, or be left empty
-
comments as always are ignored
-
the map won't be compiled if the script encounters an error
- write your code in a text file, save it with the
.wlk-
extension (or check the examples inPrograms/Examples
) - move the file in the
Programs
folder - open the
walke-
folder in a code editor, runwlmain.jl
(or open the folder in a terminal and runjulia wlmain.jl
- please don't edit/delete the folders, checking the integrity of each path might be added in the future
- before putting your map in celeste, PLEASE open it in a map editor!
- comments start with
-
, everything after it will be ignored - everything before
=
is part of the instruction, everything after is an output, that will store the results - to use the opposite of a variable, add
!
or~
before it.for example, if #00000A is true, !#00000A is false
the default instructions are:
#00000A AND #00000B = #00000C
- logical and operator#00000A OR #00000B = #00000C
- logical or operator#00000A XOR #00000B = #00000C
- logical xor operator#00000A IMPLIES #00000B = #00000C
- logical implication, it's a pseudoinstruction!#00000A EQUIV #00000B = #00000C
- if and only if, it's a pseudoinstruction!BUTTON = #00000C
- spawns an in-game button that changes state when pressed, reverts when notSWITCH = #00000C
- spawns an in-game switch that changes state when touchedOUTPUT = #00000C
- spawns an in-game block, useful to see the value of a variablePIXEL = #00000C
- similar to OUTPUT, but spawns a grid of outputs in the same column, looks better with multiple outputs!CLOCK = #00000C
- spawns an in-game clock that generates a periodic pulseTRUE = #00000C
- triggers the color when starting the room (it's like setting it "true")FALSE = #00000C
- just like TRUE, but sets true the opposite, it's a pseudoinstruction!
expansion n.1: legacy gates! legacy gates simulate the very first gates made for walke-. They don't set the color to TRUE or FALSE, but simply change state when triggered. Those "weaker" logic gates let you create circuit that can coexist even with some contraddictions
#00000A WAND #00000B = #00000C
- weak AND#00000A WOR #00000B = #00000C
- weak OR#00000A WXOR #00000B = #00000C
- weak XOR#00000A WIMPLIES #00000B = #00000C
- weak IMPLIES#00000A WEQUIV #00000B = #00000C
- weak EQUIV
expansion n.2: flags! flags change the behaviour of each gate. After calling a flag in the code, the next instructions will be influenced
> OPTIMIZED
- removes all the extra entities that make the gates more readable, useful for larger projects> NOPTIMIZED
- reverts to default> STOP
- adds a "stop" that freezes the gate, using the reserved color#FFFFFF
> NSTOP
- reverts to default
- Aletris, for compressing the logic gates as much as possible
- the Maple team, the module that made all of this possible
Isn't it Spass but worse?
No, because Walke- can't detect contraddictions. If a contraddiction happens, then the code behaves in an unpredictable way
i tried to code Walke- to make it as modular as possible. I'm not actively working on it, but in theory it should be possible to add more instructions, following those rules:
- every instruction has a name containing a single UPPERCASE word with no spaces
- every instruction has to have exactly one
=
in it, at least 1 token (its name) and 1 output - right now walke- supports instructions with 3 or 1 tokens, other types can be implemented
to implement a custom instruction:
- add a
.txt
file in theListOfInstructions
folder, write a new"NAME = SIZE"
in it (checkdefault.txt
for more infos) - if
SIZE
is different than 3 or 1, add a new module inJuliaModules
, with a customcheckstructure
function (openwlstructurecheck.jl
to see how it works) - create a
.jl
file inJuliaModules/WlInstructions
, fill it with customNAME()
functions thatreturn 0
(no errors) or an integer (an error) - depending on the number of tokens, your function should accept an (optional) array of inputs and a (
NOT
optional) array of outputs. Each element is made from a custom struct (ColorStruct
) that has a hex code (.name
) without#
and a value to check if you should generate the color or its opposite (.opposite
) - if you wish to create a different kind of in-game structure, you can code a custom
BuildInstruction