Skip to content

Add playable browser-based Defender game#1

Open
quotehunt wants to merge 1 commit into
masterfrom
codex/build-defender-game
Open

Add playable browser-based Defender game#1
quotehunt wants to merge 1 commit into
masterfrom
codex/build-defender-game

Conversation

@quotehunt

Copy link
Copy Markdown
Owner

Motivation

  • Provide a small, dependency-free browser game to serve as a demo/feature: a simple Defender-style shooter with scoring and lives.
  • Offer an interactive example that showcases canvas rendering, game loop, and input handling for use in demos or local hosting.

Description

  • Add index.html which mounts the canvas, HUD (score/lives), help text, and a Restart button wired to the game.
  • Add style.css that provides a dark-space visual style, responsive canvas sizing, and HUD/button presentation.
  • Add game.js implementing the game loop, player movement and rendering, shooting with cooldown, enemy spawning with difficulty scaling, bullet/enemy collision detection, scoring, lives, and a game-over overlay with restart support.
  • The game is dependency-free and runs by opening index.html in a browser or serving the directory with a static server.

Testing

  • Ran node --check game.js which completed successfully.

Codex Task

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