Skip to content

RascalTwo/RailSnake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rail Snake

Run on Repl.it Website

Rail-themed snake written in kaboom.js.

Link to project: https://railsnake--rascaltwo.repl.co/

rail.snake.mp4

Gameplay

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

How It's Made

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.

Optimizations

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.

Examples

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

Credits

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published