Hello, this is a port of my game Anarch for ESPboy. It is a public domain Doom-like game with 10 levels that’s designed to be very portable, you can play this on different devices including PC and browser (website). Naturally I welcomed the possibility to port it to ESPboy
On ESPboy it looks very nice, I am loving it. The port could potentially be improved, feel free to play around with it. Here are specific details about this port:
FPS is set to 22. It looks good, although I think it could go much higher if someone figures out how to compile this with -O3 (optimize for speed) instead of -Os (optimize for size) optimization flag (currently the TFT library refuses to compile without -Os).
Sounds are only simple beeps. The game has its own sounds and music that can be played if the platform allows it, but it was too difficult for me to figure out how to play arbitrary sounds from memory, so I simply use the tone() function for shooting etc. Again, feel free to improve this.
Saving/loading is an optional feature (chosen by define in the source code). With saving off you can play any level from the start. With saving on you need to unlock levels and can save your position. The data is saved using the EEPROM emulation library to flash.
I didn’t use the common ESPboy classes and wrote everything in one file (
main_espboy.ino), which prevented me from using LED easily, but you can add LED effects if you want.
You can either download the compiled bin and upload it to your ESPboy, or compile this yourself. To compile, take the file
main_espboy.inofile and all *.h files from the game repository, put them in a directory and compile the ino file with Arduino IDE, as you do with any other project.
- arrows: movement
- A: shoot, confirm
- B: hold to strafe
- right side button (=C): + U = jump, + D = menu, + A/B/L/R = change weapons
- left side button: map
Huge thanks goes to people on this forum who helped me with programming issues.