Nyan Jump is primarily written in "vanilla" ES6 JavaScript, using Canvas in order to animate the game itself. Webpack and Babel are used to transpile the code from ES6 in order to provide for greater browser compatibility.
Player
: Renders the user character, and handles specific implementation relating to the logic used to move the sprite.Platform
: Rendering based on location, implements random positions and sizes.
- The
Game
class manages the overall game state. It also handles the movement and re-rendering of the game objects. - The
GameView
class handles the animation times, click handlers, and handles resetting the state of the game itself. - The
KeyMaster
library enables the GameView class to assign click handlers easily. - The
NyanJump
takes care of interfacing the JavaScript code required to run the game with the canvas element acquired after waiting for the DOM content to load.
An up to date version of npm.
git clone https://github.com/MaxLR/nyanJump.git
cd nyanJump
npm install
npm run webpack-once
npm install -g http-server
(This globally installs a simple web server to serve the page locally)http-server
- Visit
http://localhost:8080/