Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Do you think you could link the repo? I am interested to see how you created a toolchain.
What made you choose to make your own when raylib exists?

Hmm...perhaps "toolchain" was a strong word. It's just 2 scripts, one for assembly and one for image conversion. I already said in the description why I made it (to demonstrate the issues with the rules as stated on the jam page). However, I do also just like occasionally programming in an assembly language. It's a very different feeling.

That said, I think your question is a bit odd. The assembler wouldn't be the equivalent of Raylib. Raylib is a graphics library, and my game only uses like 2 graphics functions. The assembler is used instead of Emscripten.

Here's a google drive folder with the source code:

https://drive.google.com/drive/folders/1uOcSUqop5wnH11GEj4K1q_AYLXZA-fjm?usp=dri...

wasm_as.lua is the "toolchain" in that it's an assembler script. It's just a normal lua script with no dependencies. It's used by editing the table at the top to include the files to use as input, which are treated as if concatenated into one file. The best files to look at for how the code works are header.txt and main.txt. The index.html file is also pretty important, as that's where the gl functions are. The images folder contains the png's for the images used and the files keg_utils.exe and utils.lua. That file pair is part of my own personal lua-engine, but for this case it allows walking the directory and opening png files as a buffer of decoded pixels. The output for utils.lua is in the format needed for the assembler script, but the data is just the image with rle applied and width, height pair at the front (4 bytes each).

I also left the notes.txt file in, which contains notes on both how a wasm binary works and also notes on the syntax I used for the assembler.