The Arduboy is a tiny Arduino powered handheld console that you can use to create your own games or download and play other peoples. I have wanted one ever since I first saw it on the Pimoroni store as I like doing a bit of game development from time to time and the nature of the device would keep the projects small and manageable.
I decided to start by making a clone of the popular snake game. I thought it would be pretty simple with the only complex thing being tracking and drawing the snakes tail.
The language used to work on Arduino devices is c/c++ so given that I work with c# on a daily basis I was able to put something together pretty quick. There are of course differences between the languages and the best styles to adopt when working on Arduino. The main difference is memory management, there is no garbage collection here so you have to manage that yourself.
The core functionality of the game is in place. Things on my todo list include making the maximum length of the snake longer, having the game speed increase with the score (start slower) and introduce a high score table.
The length of the snake is a challenge as increasing the maximum length has previously led to some memory issues. The Arduboy does not have much in the way of resources making it more of a challenge to work with than conventional desktop machines. This is all part of the fun or course!
You can clone the game code from my Arduboy GitHub repository. The code file for this game is inside the snack folder. You will need the Arduino IDE installed and configured to work on Arduboy projects in order to flash the game onto an Arduboy.
I used this helpful article to get my IDE up and running.
The game is MIT licensed so feel free to fork etc…