Snake is a simple game that touches on a number of key game development concepts. It is a good project to work on in order to gain familiarity with fc64js
This tutorial walks you through:
- Initialising the rom
- Utilising the rom's main loop
- Clearing the screen
- Drawing rectangles
- Drawing images
- Drawing text
- Handling user input
- Managing state
- Playing sound effects
- Distributing your game
Note: This fc64js tutorial is based on this wasm-4 tutorial
Your finished game will end up looking like this:
Jump to step: Introduction · Project setup · Creating the snake · Drawing the snake · Moving the snake · Throttling the speed · Input handling · Placing the fruit · Eating the fruit · Losing the game · Managing state · Playing sound effects · Bug fixing · Distribution