Skip to content

chigerartem/pixel-horse-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐴 Pixel Horse Runner

A pixel-art endless runner in the spirit of the Chrome Dino game — written in pure vanilla JavaScript, no frameworks, no dependencies, no build step.

Пиксельный бесконечный раннер в духе игры Chrome Dino — на чистом JavaScript, без фреймворков, без зависимостей, без сборки.

▶️ Play / Играть: https://chigerartem.github.io/pixel-horse-runner/

Pixel Horse Runner gameplay


🇬🇧 English

Jump over hurdles and duck under birds for as long as you can. The world speeds up the longer you survive, and your best score is saved locally between sessions.

Features

  • 🎮 Runs entirely in the browser — a single HTML file plus one CSS and one JS file
  • 🖌️ Hand-drawn pixel sprites built from ASCII masks and rendered to <canvas> (no image assets)
  • 🏃 Run / jump / duck animations, variable jump height, and a falling state
  • 🐦 Two obstacle families: jumpable hurdles (small & large) and birds at body or head height
  • 📈 Difficulty ramps up as speed increases; score and high score (localStorage)
  • 📱 Responsive canvas that scales down on small screens
  • ⚡ Zero dependencies — no npm, no bundler, no framework

Controls

Key Action
Space / Jump (hold for a higher jump)
Duck (and fast-fall while airborne)
Space Start / Restart

Run locally

Because the game loads game.js and style.css over HTTP, open it through a local server rather than file://:

# Python 3
python -m http.server 8000
# then open http://localhost:8000/

On Windows you can just double-click start.bat, which launches the server and opens the browser for you.

Tech

Vanilla JavaScript · HTML5 <canvas> · CSS. The entire game loop (requestAnimationFrame), physics, collision detection (AABB), spawning, and rendering live in game.js.


🇷🇺 Русский

Перепрыгивай барьеры и подныривай под птиц как можно дольше. Чем дольше держишься — тем быстрее становится игра. Рекорд сохраняется локально между запусками.

Возможности

  • 🎮 Работает целиком в браузере — один HTML-файл плюс по одному файлу CSS и JS
  • 🖌️ Пиксельные спрайты нарисованы вручную из ASCII-масок и рисуются на <canvas> (без картинок-ассетов)
  • 🏃 Анимации бега / прыжка / приседания, переменная высота прыжка, состояние падения
  • 🐦 Два типа препятствий: барьеры (маленький и большой) и птицы на уровне корпуса или головы
  • 📈 Сложность растёт вместе со скоростью; счёт и рекорд (localStorage)
  • 📱 Адаптивный канвас, масштабируется на маленьких экранах
  • ⚡ Ноль зависимостей — без npm, без сборщика, без фреймворков

Управление

Клавиша Действие
Space / Прыжок (зажми для прыжка повыше)
Пригнуться (и быстро упасть в воздухе)
Space Старт / Рестарт

Запуск локально

Игра подгружает game.js и style.css по HTTP, поэтому открывай её через локальный сервер, а не через file://:

# Python 3
python -m http.server 8000
# затем открой http://localhost:8000/

На Windows достаточно дважды кликнуть по start.bat — он сам поднимет сервер и откроет браузер.

Технологии

Чистый JavaScript · HTML5 <canvas> · CSS. Весь игровой цикл (requestAnimationFrame), физика, проверка столкновений (AABB), спавн препятствий и отрисовка находятся в game.js.


📁 Project structure

pixel-horse-runner/
├── index.html   # Markup + canvas
├── style.css    # Styles
├── game.js      # Game logic, sprites, rendering
├── start.bat    # Local server launcher (Windows)
└── README.md

📄 License

MIT © chigerartem

About

🐴 Pixel-art endless runner in the spirit of Chrome Dino — pure vanilla JavaScript, zero dependencies.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages