An HTML5 endless runner game built with vanilla JS and Canvas API. No dependencies, no build step — just open index.html and play.
You control one of three procedurally drawn creatures called Tarakozyabras. They run automatically through an infinite side-scrolling world. Your job:
- Jump over ground obstacles (rocks, cacti)
- Duck under overhead hazards (flying bugs)
- Collect coins for bonus points
- Survive as long as possible — difficulty increases with each round
Every round the world speeds up and obstacles come more frequently. Your score and a top-10 leaderboard are saved locally in the browser.
| Action | Keyboard | Touch |
|---|---|---|
| Jump | Space / ↑ / W |
Tap |
| Duck | ↓ / S |
Swipe down |
| Pause | P / Esc |
— |
| Confirm / Restart | Enter |
Tap |
- 3 selectable heroes with unique looks and animations
- Procedural graphics — all drawn in code, no image files
- Procedural sound effects via Web Audio API
- Parallax scrolling background
- Round-based difficulty scaling
- Top-10 leaderboard stored in
localStorage - EN / DE localisation (auto-detected from browser language)
- Works offline, zero dependencies
Drop the game into any page with a single <iframe>:
<iframe
src="https://your-domain.com/404-game/index.html"
width="900"
height="360"
style="border:none; max-width:100%;"
allowfullscreen
></iframe>- Copy the entire repository into a folder on your server:
/your-site/ └── 404-game/ ├── index.html ├── style.css └── src/ - Link to it or embed it however you like. No server-side setup required — it is a static site.
Use the game as a fun 404 error page. In most web servers you can point the 404 handler at index.html:
Nginx
error_page 404 /404-game/index.html;Apache .htaccess
ErrorDocument 404 /404-game/index.htmlNext.js — rename / copy to pages/404.tsx or use a redirect in next.config.js.
All game constants (speed, gravity, round length, score values) live in src/config.js. Edit that file to re-balance the game without touching any logic.
No build step required. Open index.html directly in a browser, or serve with any static server:
python3 -m http.server 8080
# then open http://localhost:8080MIT License — see LICENSE.
© 2024 Lazy Ants. Built with ❤️ and vanilla JS.
