I recently went through learning how to do small games in the retro game environment PICO-8:
PICO-8 is something called a fantasy console, which means it looks and acts like a gaming system from the 80s, but is using modern technology and only pretends to be limited. There are a lot of tutorials for PICO-8 on youtube, and I many books explaining how to get started. It uses the language Lua to do all of its programming, which you can learn online:
There are many other similar retro game systems–which I’ll be reviewing in this corner of the forum–but I started out with PICO-8 in order to explore this genre of game.
These games are not original and just mostly direct copies I made from the book here:
The book is short and takes you through a couple games (the ones I have here), so if you want type in the code and get them working and then try to change them.
For those who want to do the cave game, if you get a syntax error in move_player() near +, just rewrite it, cause Lua doesn’t seem to like += (compound operators)
so instead of player.y += player.dy , do player y = player.y + player.dy
I read this explanation: language design - Lua operators, why isn't +=, -= and so on defined? - Stack Overflow
L.E. Nevermind, it might be something wrong with my Lua install, I get other errors too, although I copy the exact code. I must have missed something, or it has to do with Lua running on Linux, etc, have to discover what it is.
L.E. 2 Lol, the tutorial is for Pico-8, I am using Tic-80, a tiny difference…
Well, I didn’t know for once why the examples wouldn’t run, then I saw some examples in Tic-80, I needed to have a TIC() function that called my init, update and draw functions.
I installed the demo scripts in Tic-80 and noticed how they were structured.
Pico-8 doesn’t have that , you can just run the examples without tweaking them.
One good thing with Tic-80 is you can choose among a few more languages, JS included.
I just went with Lua, but will try JS too.
Here’s a few differences: https://www.reddit.com/r/pico8/comments/be5gd7/thoughts_on_tic80/
OMG!
This is so addictive, I was looking how to translate some functions from the Pico-8 API to Lua and I made it work.
Finished step 3…
I think TIC-80 uses full real Lua while PICO-8 uses a smaller custom Lua. That might be the difference, but the API and code are so close you can easily translate. Also, try playing with the palettes. You can tell TIC-80 to use the PICO-8 palette or many others to get different looks.