Skip to content
Ā 
Ā 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Ā 

History

22 Commits
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 
Ā 

Repository files navigation

Super Hero Game

GitHub repo size GitHub last commit Stars GitHub Pages


JavaScript/HTML5 Canvas space shooter, based on the Kodeco (Ray Wenderlich) Cocos2d-x tutorial, rebuilt as a browser game.

Tutorial source: https://www.kodeco.com/2728-cocos2d-x-tutorial-for-ios-and-android-space-game


Play Online


Features

  • Player movement (keyboard)
  • Laser shooting with object pooling
  • Asteroid spawning with pooling
  • Laser ↔ asteroid collision detection
  • Player hit detection, lives, and invulnerability blink
  • Win/Lose game states and restart
  • Parallax scrolling backgrounds
  • Particle starfield
  • Background music + sound effects
  • Debug toggles for tuning
  • Top menu + dark/light theme toggle

Controls

  • Move: ASDW or ↑ ↓ ← →
  • Fire: Space
  • Restart: R or Enter
  • Toggle Audio: M
  • Debug: P
  • Parallax seam debug: O
  • World speed: K / L

Tech Stack

  • Vanilla JavaScript (ES Modules)
  • HTML5 Canvas
  • CSS
  • Audio via HTMLAudioElement
  • Texture atlas + plist parsing

Run Locally

Option 1: npm (recommended)

npm install
npm start

Then open: http://127.0.0.1:5500/

Option 2: VS Code Live Server

  1. Open project in VS Code
  2. Run Live Server on index.html
  3. Open in browser

Option 3: Python static server

python -m http.server 5500

Then open: http://127.0.0.1:5500/


Project Structure

assets/
  audio/
    music/
    sfx/
  images/
  particles/
css/
src/
  audio/
  entities/
  fx/
  gfx/
  game.js
  input.js
index.html
package.json

Audio Notes

  • Background music uses assets/audio/music/SpaceGame.ogg with MP3 fallback.
  • Sound effects are loaded from assets/audio/sfx/.

Screenshots

TBD


Related Projects


Credits

  • Original tutorial/game design inspiration: Kodeco / Ray Wenderlich Cocos2d-x Space Game tutorial
  • Original C++ versions from Platform Game Development work

About

Super Hero Game. Will delete later😁

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages