Rail-themed snake written in kaboom.js.
Link to project: https://railsnake--rascaltwo.repl.co/
rail.snake.mp4
Your goal is to extend your track as long as possible without crashing.
- Arrow keys control movement direction
Crashes can be caused by three things:
- Driving off the grass
- Driving into your own track
- Driving into a powered rail at an incorrect angle
You can't turn directly off a powered rail
Tech Used: HTML, CSS, JavaScript, kaboom.js
Starting off with two screens, the gameover one and the actual gameplay one, then went with a singleton IIFE to encapsulate the logic accordingly. After getting the tiling system working, I appended the randomized placement of track pieces and the player's movement. Finally I added player movement, collision detection, and scoring.
While the tiling system does work, It could be optimized by using more kaboom.js native features, additionally the gameplay itself could be customized for non-desktop devices.
This isn't the first nor last game I've written using Kaboom.js:
Infinite Driver: https://github.com/RascalTwo/InfiniteDriver
Flappy Bird: https://github.com/RascalTwo/FlappyBird
- Faithful Team for the assets