Skip to content

Latest commit

 

History

History

snake-js

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

fc64js - Tutorial - Snake (js)

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

Preview

Your finished game will end up looking like this:

Finished code

Live preview

Continue to the next step


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