bobgeis / js-space-rocks

Asteroids in javascript: https://bobgeis.github.io/js-space-rocks/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

js-space-rocks

This is a learning project made while learning javascript. It's an asteroids clone, because whenever one learns a new language, it's fun to make a game in it, and I happen to like asteroids.

Play it here.

Controls

Keyboard:

  • LEFT (or A) and RIGHT (or D) rotate the player ship
  • UP (or W) accelerates the player ship
  • DOWN (or S) reverses
  • SPACE fires the disintegrator
  • P pauses, ENTER unpauses
  • Z activates the Omega 13: "Enough time to undo a single mistake" Note that if charged, you can use this even if your ship is destroyed.
  • ENTER starts the game, restarts on destruction (remember to try Z if you can)
  • U resets the high score to all zeros

Objectives

Oh no! Some hooligans are dumping space rocks in to Subspace Locus 1457 again!

Luckily, a dedicated rescue and rock-buster ship is already prepped and on-site. That's you!

  • Try to keep Subspace Locus 1457 safe for travelers.
  • If any ships get hit by rocks, pick up their lifepods and deliver them to the medbay in the North East quadrant for treatment.
  • If you pick up any crystalline minerals from busting rocks, deliver those to the prospector base in the South West quadrant for analysis.
  • If you get into a jam, hopefully you have enough charge on your Omega-13 to try again. Good luck!

Attributions

Background image of Carina Nebula is available here. Credit to ESO/T. Preibisch used under CC BY 4.0.

All other sprites were made by the programmer.

Developers

Download or clone this repo onto your local drive, then cd into the folder containing package.json and yarn or npm install.

  • For a hot reloading dev server: yarn start or npm start and go to http://localhost:3000 in your browser.
  • For the minified bundle: yarn prod or npm run prod and then open index.html in your browser.

Influences

Asteroids and similar games (eg: Escape Velocity, Endless Sky, etc).

Previous practice projects in other languages (eg Elm, CoffeeScript).

Another implementation of asteroids in React. link

Various Redux examples. link

A Redux Immuble TodoMVC example. link

A Redux Undo TodoMVC example. link

The Elm Graphics.Collage library. link

About

Asteroids in javascript: https://bobgeis.github.io/js-space-rocks/


Languages

Language:JavaScript 99.2%Language:CSS 0.4%Language:HTML 0.4%