Forest Trader (Port of attiny-arcade game)

(bored during this interminable lockdown, ported an attiny-arcade game I did last year. It’s a 2-button game only left/right, and B button acts same as right button. It’s minimal, uses 504 bytes RAM and 12K flash)


Amazing you can squeeze it into that little RAM / Flash !

attiny arcade (attiny85) only has 8K flash and 512 bytes RAM, so it’s an interesting challenge to code for. No screen buffering possible, everything has to be rendered on the fly, I use a tiny xorshift random generator, generative map and place names and so on. All good old-school fun. Makes the Arduboy look like a mainframe.

1 Like

Old mainframes used to have little memory as well. More than 8K of course but nothing compared to modern machines.

Tried uploading this to my Arduboy but the A and B buttons dont work (and the directional buttons might not either, could only scroll one way down the menu). Verified before and after using other sketches that it wasnt my arduboy and was indeed the sketch.

I just tried it again, it works as intended.

This is a game that is written for a console that only has 2 buttons, this Arduboy version simulates that by only using the left and right buttons, with the ‘B’ button acting the same as the ‘right’ button. (I don’t have the motivation to rewrite the controls from scratch.)

1 Like

Oh whoops, sorry. Which button confirms the menu selection? Could only seem to scroll down the menu, couldn’t figure out how to confirm though

Should just be ‘b’ button to select menu option (or the right button on d-pad). Left moves down the menu. Strange if that doesn’t work.

1 Like

Ok, cool. Honestly when I tried it i was in a bit of a hurry before i left for a camping trip so id have something to play while i was gone, didnt spend a whole lot of time on it but will definitely give it another try here in a bit, thanks!

Dude this game is so cool! Surprisingly engaging for being as minimal as it is, and just complex enough to make the gameplay loop quite addicting. I could definitely see myself playing this for long amounts of time (almost makes me wish there was a save function, honestly lol), i can only imagine how much more you could add to the game considering how little memory it uses… not that i wouldnt consider it finished as is of course, a good game just always seems to leave you wanting more i suppose lol. Great work though, definitely adding this one to my favorites list, excited to rack up my score!

Um, there already is a save function, it saves your current state everytime you arrive at a new destination. It’s supposed to be a ‘keychain game’ thing you can play for a couple of minutes at a time, switch off, then come back to later.

I’ve noticed that unlike the attiny version, re-flashing doesn’t put the game back to the inital state, I might do a quick fix so when you die in the Arduboy version it resets to the initial state instead. Anyway yea.

1 Like

If you’re saving game data to EEPROM then it wouldn’t do. Flashing the Arduboy doesn’t wipe the EEPROM, it only overwrites the progmem/flash.

It’s possible to wipe the EEPROM via the bootloader, but you’d need to send a different set of commands to AVRDude (the program that communicates with the bootloader to instigate, among other things, overwriting the flash memory with new software).

If the game were open source, you’d be able to add features yourself, but unfortunately there doesn’t appear to be a licence anywhere.

I’ll stick a licence in on the github as well I guess if that helps. It was just a side project based on the old 8bit ‘3D deathchase’ action game combined with the trading/upgrades elements of Elite.

1 Like

Oh wow, even better! I didnt make it long enough to shut it off before dying my first couple times playing :laughing: maybe next time ill have better luck. Good to know though, thats awesome, thanks!

Im having problems uploading a new sketch after this one, even after trying to use the reset button trick my computer refuses to see it on the com port

Edit: nevermind, pretty sure my arduboy is now broken from trying to push the reset button, just gonna use my fx instead

Have you tried using ‘flashlight’ mode?
I.e. hold the up button when turning your Arduboy on.

And have you checked that the com port hasn’t changed?
When your Arduboy is turned on and connected, check the Port list under the Tools menu.

I tried flashlght mode but it appears it was not included in this game, thats why i was trying to use the reset button. I tried checking my com ports before, during, and after using the reset button but it still isnt showing up. Also tried connecting to a different usb port and checking the com ports again but its still not showing up.

Edit: it appears i had a bad cable, but this didnt fix my arduboy issue (which may have just reached the end of its life and died tbh)