Skip to content

Add Neon Rush browser racing game - #1

Open
Maxicle1 wants to merge 2 commits into
mainfrom
codex/create-browser-based-racing-game
Open

Add Neon Rush browser racing game#1
Maxicle1 wants to merge 2 commits into
mainfrom
codex/create-browser-based-racing-game

Conversation

@Maxicle1

@Maxicle1 Maxicle1 commented Feb 3, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Добавить лёгкую автономную браузерную гонку в стиле Need for Speed для быстрой демонстрации, тестирования и встраивания в страницу.

Description

  • Добавлен файл index.html, реализующий игру "Neon Rush" на Canvas с неоновым оформлением и HUD.
  • Реализована игровая логика: состояние игры, управление (←/→, A/D, ↑/W, Shift, R), спавн препятствий и ускорителей, проверка столкновений и сохранение рекорда в localStorage.
  • Добавлен экран старта/рестарта, визуальные эффекты (дрожание камеры, пульсация ускорителей) и расчёт позиций дорожных полос для адаптивного отображения.

Testing

  • Запущен локальный HTTP-сервер с python -m http.server и выполнен Playwright-скрипт, который загрузил http://127.0.0.1:8000/index.html и сделал скриншот artifacts/neon-rush.png, проверка прошла успешно.
  • Юнит-тесты не были добавлены и не запускались.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c120900050

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread index.html
Comment on lines +429 to +433
window.addEventListener("keydown", (event) => {
keys.add(event.code);
if (!state.running && (event.code === "Space" || event.code === "Enter")) {
start();
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset game state before allowing Space/Enter restart

When the player collides, end() sets state.running = false but does not clear obstacles or reposition the car. The keydown handler lets Space/Enter call start() without a reset(), so after a crash pressing Space/Enter resumes with the old obstacles still overlapping the car, which typically triggers an immediate re‑collision and effectively blocks restart unless the user hits R or the button. This is user-visible because the overlay says “press Start or R”, but Space/Enter is still enabled and behaves incorrectly in that post-crash state.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant