Skip to content

A lightweight JavaScript game inspired by Stick Hero. Grow the stick, bridge the gap, and help the hero cross platforms using pure HTML5 Canvas and vanilla JavaScript.

Notifications You must be signed in to change notification settings

Anas-Shanan/stick-Hero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Stick Hero Game Clone

A simple browser-based clone of the "Stick Hero" game.
Built with vanilla JavaScript and HTML5 Canvas β€” no frameworks, no libraries.

πŸ“„ Topics

  • JavaScript
  • HTML5 Canvas
  • Game Development
  • 2D Animation
  • Game Physics
  • Stick Hero Clone
  • Frontend Project

πŸ“ Project Structure

/
β”œβ”€β”€ main.js           # Game initialization, main loop, event handling
β”œβ”€β”€ Hero.js           # Hero character logic (walk, fall, animate)
β”œβ”€β”€ platform.js       # Platform generation, drawing, and collision detection
β”œβ”€β”€ stick.js          # Stick growth, rotation, and collision
β”œβ”€β”€ index.html        # HTML container (you should have it)
β”œβ”€β”€ assets/imgs/      # Spritesheet and images
└── style.css         # Basic CSS (optional but recommended)

πŸ› οΈ How to Run

  1. Clone the repository.
  2. Make sure you have an index.html that links to main.js.
  3. Open index.html in any modern browser.
git clone https://github.com/your-username/stick-hero-clone.git
cd stick-hero-clone
# Open index.html

πŸ•ΉοΈ How to Play

  • Click and hold to grow the stick.
  • Release to let the stick fall across to the next platform.
  • If the stick is too short or too long, the hero will fall.
  • Reach the middle of the platform for extra rewards (you can expand logic).

πŸ“’ Notes

  • Game uses Canvas 2D API only.
  • Fully responsive scaling using ResizeObserver.
  • No external libraries (pure JavaScript and Canvas).

πŸ“ License

This project is for learning and practice purposes.
Feel free to fork, modify, and improve it!


Made with ❀️ by a student for training and portfolio building.

About

A lightweight JavaScript game inspired by Stick Hero. Grow the stick, bridge the gap, and help the hero cross platforms using pure HTML5 Canvas and vanilla JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •