Andrey Listopadov

Game2 W1/4

@gamedev tic80 lua ~3 minutes read

First week, second game!

This time I opted to go with plain Lua. Don’t get me wrong, I like Fennel, but I wanted to get a bit more authentic experience. Apart from having a nicer standard library, Fennel doesn’t add anything to the table in the case of the TIC-80 environment. E.g. there’s no REPL that I can attach to from the editor and change code around, and there’s no real need for macros.

Plus, I’d like to remind myself why I appreciate Fennel so much, as things like pattern matching, table comprehensions, and other Fennel-specific features are not available in Lua. On the other hand, Lua is simpler, and the code being run is what you’d expect, not something that a compiler produced. If you dared to look into the Lua version of the cart that I published at the end of the last post on the Game1 topic, you know that it looks horrific at times.

So Lua it is. TIC-80 actually provides even more languages, namely Ruby, JavaScript, MoonScript, Scheme, Squirrel, Wren, Janet, Python, and even plain WASM, I may try to use some of these. I haven’t decided on future games yet though.

Speaking of languages - why so many? This is probably the single thing I dislike about TIC-80 and like more in PICO-8 - the latter is only programmable in a subset of Lua. If I’m being honest, I would rather only leave Lua in TIC and ditched everything else - it’s much more authentic this way. Even if that would mean losing direct Fennel support which, while a shame, is OK - we can always AOT.

I’ve quickly gone through the development log, and it seems that the author is pretty generous with adding new languages to the project. MoonScript was added first (probably), as far as I can see. There’s a still open request for Nimscript, whatever it is. Don’t get me wrong, the project is nothing less than amazing, I just think less is more when it comes to things like this. But I digress.

I’ve spent most of my first week thinking about the game and what would it evolve around. After a bit of consideration, I decided to make a cyber-based roguelike, because there are already way too many traditional magic-based roguelikes. So instead of a mighty artifact in my game, the character will search for the mighty neural chip that can do any kind of calculations instantly. I can also try focusing on range battles, which should give a fresh spin on classic roguelikes too.

I started working on graphics, but then life told me that I should not do anything this week and I had a power outage for quite some time. Anyhow, this is what I got so far:

I also tried making some floor tiles, and once again I feel the limitations of the palette - it’s so hard to come up with floor tiles that will make other sprites properly visible. Maybe I’ll add outlines if I will not find a clever solution.

One such solution might be to divide the palette into two smaller palettes. In other words, the first 8 colors can be used for interactable objects, and the last 8 for the scenery. Maybe I’ll try that too. It’s even more restrictive, though.

Unfortunately, I don’t think I followed my own word, and the first week went pretty unproductive regarding Game2. And yes, I will name all of these games like that, sorry! I did some work on my async library for Fennel, as I found some bugs in it though. But I’ll bring the pace up the next week for sure!