A Tron-style snake game



Jun 21st (latest)
version 0.1.6
Jun 20th
version 0.1.5
Jun 20th
version 0.1.4
Apr 23rd
version 0.1.3
Apr 23rd
version 0.1.2
Apr 23rd
version 0.1.1
Feb 11th
version 0.1.0
Jan 20th
version 0.0.2
Jan 16th
version 0.0.1
How to implement a game engine in JavaScript and build a Tron-style game
0 / 7


This tutorial will guide you through the following steps:

  • Step 1 - Creating a server
  • Step 2 - Creating a game engine basis
  • Step 3 - Creating a splash screen using a keyframe animation engine
  • Step 4 - Creating a main menu screen using a font engine
  • Step 5 - Creating a snake and related geometry shapes
  • Step 6 - Creating a complex game screen with multiple layers
  • Step 7 - Bonus! Re-implementing geometry in C++

Make sure you have the following software installed:

  • NodeJS with an ECMAScript 2015 support (v6.0.0 and above).
  • Any web-browser which supports ECMAScript 2015, with a preference for Google Chrome.

The final project is a hybrid of C++ and JavaScript. A JavaScript only version of this tutorial is available here.

This tutorial is mostly based on pure JavaScript, so people can have a deeper understanding of the language and its dynamics. In addition, this tutorial makes a great practice on how to build a nice architecture for complex systems, which can then be expanded and maintained with ease. Yes, it is specifically designed for games, but I truly believe that video games can easily get messed up if not planned and designed properly in terms of object oriented relationships. They are naturally more complicated then any web-app you gonna see out there, so if you can create a game engine and understand its flow, creating a web-app would be a piece of cake for you. By the end of this tutorial, your general sense for programming should be enhanced greatly.

So hopefully that I got you pumped up by now, let's get started!