convez.ai
AgenteDesenvolvimento WebIntermediário
jwheat

StarMaze - Jogo de Labirinto Arcade com IA

jwheat/starmaze

Arcade retrô com labirintos procedurais e IA de inimigos

Ver no GitHub
InicialPluginScore · de 0 a 100

Recriação do clássico StarMaze (1982) usando programação agentic com Claude. Um jogo de arcade top-down com labirintos procedurais, inimigos com IA, coleta de estrelas e dificuldade escalável. Construído com Phaser 3 e JavaScript, com todas as assets geradas proceduralmente em tempo de execução.

Instalação

$npx convez-ai jwheat/starmaze

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 8 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Aprender game development com Phaser 3 e programação agentic
  • Explorar algoritmos de geração procedural de labirintos (DFS)
  • Implementar AI de inimigos com patrulha e perseguição
  • Prototipagem rápida de mecânicas de jogo com Claude Code

Veredito

Projeto interessante que combina game dev clássico com agentic programming moderno. Bem estruturado, com documentação clara e exemplifica bem como usar Claude Code para iterar em projetos complexos. Ideal para quem quer aprender Phaser 3 e programação dirigida por IA simultânea.

README

A tradução para o português deste README ainda está na fila.

StarMaze

A top-down arcade maze game built with Phaser 3. Navigate procedurally generated mazes, collect stars, fight enemies, and find the exit to advance through increasingly difficult levels.

Tech Stack

  • Game Engine: Phaser 3 (v3.90.0)
  • Build Tool: Vite (v7.3.1)
  • Language: JavaScript (ES Modules)

All graphics are procedurally generated at runtime — no external image assets are required.

Prerequisites

  • Node.js (v18 or later recommended)
  • npm (included with Node.js)

Installation

cd starmaze
npm install

Running the Game

Development Server

npm run dev

This starts a local Vite dev server with hot module reloading. Open the URL printed in the terminal (typically http://localhost:5173) in your browser.

Production Build

npm run build

Outputs optimized files to the dist/ directory.

Preview Production Build

npm run preview

Serves the dist/ folder locally so you can test the production build before deploying.

Project Structure

starmaze/
├── index.html                  # HTML entry point
├── package.json                # Dependencies and scripts
├── src/
│   ├── main.js                 # Phaser game initialization and config
│   ├── config.js               # Game constants (speeds, scores, colors, etc.)
│   ├── entities/
│   │   ├── Ship.js             # Player ship (movement, shields, lives)
│   │   ├── Enemy.js            # Enemy AI (patrol, chase, shoot)
│   │   ├── Bullet.js           # Projectile logic (player and enemy)
│   │   └── Collectible.js      # Pickups (stars, shield gems, life gems)
│   ├── scenes/
│   │   ├── BootScene.js        # Asset generation and boot
│   │   ├── GameScene.js        # Main gameplay loop
│   │   ├── HudScene.js         # Score, lives, shield, and message UI
│   │   └── GameOverScene.js    # End-of-level / game over screen
│   ├── maze/
│   │   ├── MazeGenerator.js    # Maze generation (recursive backtracker DFS)
│   │   └── MazeBuilder.js      # Converts maze data to a Phaser tilemap
│   └── utils/
│       └── TextureGenerator.js # Procedural sprite/texture creation
└── dist/                       # Production build output

How It Works

Scene Flow

  1. BootScene — Generates all textures procedurally, then immediately launches the game.
  2. GameScene — The main gameplay scene. Generates the maze, spawns the player, enemies, stars, gems, and the exit portal. Runs the physics and game logic each frame.
  3. HudScene — Runs in parallel with GameScene. Renders the score, star counter, shield bar, lives display, level indicator, and temporary messages.
  4. GameOverScene — Shown when the player completes a level or loses all lives. Displays results and waits for input to continue or restart.

Maze Generation

Mazes are generated using a recursive backtracker (iterative DFS) algorithm, producing a perfect maze (exactly one path between any two cells). The maze is converted into a Phaser tilemap where each maze cell is a 7x7 tile grid (224x224 pixels). Dead-end cells are used for placing stars, gems, enemies, and the exit portal.

Difficulty Scaling

AspectFormula
Maze size12 + floor(level / 3) cells per dimension
Enemy count5 + level (capped by available dead-end cells)
Star count8 + (2 x level)

Configuration

All game constants are defined in src/config.js. Key values include movement speeds, fire rates, scoring, enemy AI ranges, maze dimensions, and colors. Modify this file to tweak gameplay balance.

Development Process

StarMaze was built through an agentic pair-coding process between Jonathan and Claude Code, Anthropic’s AI coding assistant.

Jonathan led the creative direction of the project — defining the gameplay systems, shaping the design of the maze mechanics, and playtesting each iteration to refine the experience. Claude handled the bulk of the implementation work, generating code, structuring the project, and assisting with debugging and system design.

New features typically evolved through an iterative loop. Jonathan would propose a gameplay idea or describe a problem to solve. Claude would respond with a proposed approach and technical plan. After reviewing and refining the approach together, Claude implemented the changes. Jonathan would then playtest the result, provide feedback, and the cycle would repeat.

Many of the core gameplay systems — including fuel mechanics, shield behavior, enemy AI patterns, and procedural maze generation improvements — emerged through this collaborative process.

While the implementation was generated by Claude, every feature was guided, reviewed, and refined by Jonathan through this agentic development workflow.

The goal of this project was not only to recreate a classic maze-style arcade experience, but also to explore how modern AI coding tools can accelerate development while still benefiting from human design judgment and iterative playtesting.

Browser Support

Runs in any modern browser that supports WebGL or Canvas 2D (Chrome, Firefox, Safari, Edge). Phaser 3 uses Phaser.AUTO to select the best available renderer.

Ver o original no GitHub

Bom para

Relacionados