A simple browser-based clone of the "Stick Hero" game.
Built with vanilla JavaScript and HTML5 Canvas β no frameworks, no libraries.
- JavaScript
- HTML5 Canvas
- Game Development
- 2D Animation
- Game Physics
- Stick Hero Clone
- Frontend Project
/
βββ 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)
- Clone the repository.
- Make sure you have an
index.htmlthat links tomain.js. - Open
index.htmlin any modern browser.
git clone https://github.com/your-username/stick-hero-clone.git
cd stick-hero-clone
# Open index.html- 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).
- Game uses Canvas 2D API only.
- Fully responsive scaling using ResizeObserver.
- No external libraries (pure JavaScript and Canvas).
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.