How aywen1/video-battle-ia-minecraft works
1. This repository is not one application; it contains four independent browser games, one per AI model: chatgpt/, claude/, gemini/, and grok/. Each folder has its own index.html, package.json, TypeScript config, and source tree, so there is no shared runtime or shared code between the four implementations.
2. All four projects are client-side voxel/Minecraft-style games meant to run in the browser. The architectural center is always the same domain shape: a block world, a player/avatar, moving entities or mobs, inventory/UI, and a rendering layer that turns chunked world data into visuals.
3. The chatgpt project is organized as an engine-style monolith under src/engine/. It has a central Engine plus a shared EventBus, and then feature subsystems for world, physics, rendering, player control, audio, inventory, crafting, interactions, NPCs, mobs, dropped items, lighting, textures, and UI. This is the most “modular engine” layout in the repo.
4. In chatgpt, the world pipeline is explicit: block definitions and constants feed chunk data, WorldGenerator and its biome/noise/feature helpers create terrain, ChunkManager manages active chunks, and VoxelMesher converts voxel data into renderable geometry. Gameplay systems like breaking blocks, debris, dropped items, and physics sit on top of that world representation.
5. chatgpt also shows a strong interaction boundary between simulation and presentation. Player input and interactions flow through PlayerController, BlockInteractor, and similar systems into world state; UI modules such as HUD, dialogue, trading, and game state react to that state, while renderer/audio systems provide the visible and audible output.
6. The claude project uses a more traditional game-engine layering. It separates core (engine and input), world (chunk/world generation and structures), entities (mob manager, AI, combat, spawning, models), player (physics and status effects), rendering (meshing, particles, lighting, weather, water, post-processing), audio, textures, and ui.
7. claude is broader in presentation systems than chatgpt: it includes shadowing, SSAO, weather, sky, water, torch lighting, particles, and several UI overlays such as inventory, minimap, pause/menu screens, death screen, achievements, commands, and XP. That suggests a pipeline where the game state drives multiple visual post-effects and HUD layers.
8. The gemini project is the most React-centric architecture. src/App.tsx is the top-level UI composition, and the game is split into reusable React components for player, chunks, mobs, and UI. State is centralized in store/ slices for inventory, achievements, and mobs, with hooks like useKeyboard and useAchievementCheck bridging browser input into app state.
9. In gemini, the simulation layer is relatively compact: game/world.ts, game/physics.ts, and game/constants.ts hold core mechanics, while textures/TextureFactory.ts and texture mapping utilities feed rendering. This makes the data flow more declarative: input hooks update store/game state, React components read from that state, and UI/game components re-render accordingly.
10. The grok project is the smallest and most minimal. It appears to be a lightweight React/Vite demo with a BasicVoxelWorld, a SimpleVoxelWorld, and a Crosshair UI component. This suggests a proof-of-concept architecture focused on displaying a voxel scene rather than a full game simulation stack.
11. Across the repo, the most important architectural boundary is between voxel simulation and presentation. Chunk/world modules own block data and generation; meshing modules convert chunks into geometry; UI modules render inventory/HUD/menus; player and entity modules update state based on input and physics; audio and lighting act as cross-cutting subsystems.
12. Another consistent characteristic is that these are all front-end-only applications. There is no backend service, database, or network layer in the repository tree. Any persistence, progression, or game state appears to be local/in-memory within the browser app.
13. If you were drawing a diagram, the main top-level boxes should be the four independent apps, and inside each one the dominant flow is: browser input → player/simulation systems → world/entity state → meshing/rendering/UI/audio. The exact subsystem granularity differs, but that overall client-side game loop is the shared architecture pattern.
Main entry points: Engine.ts Engine · core Core · world World · rendering Rendering
Components 22
chatgpt
Engine-style browser voxel game
- Engine · Central game loop and subsystem coordinator
chatgpt/src/engine/core/Engine.ts - World · Chunks, generation, meshing, and block data
chatgpt/src/engine/world - Player · First-person control and block interaction
chatgpt/src/engine/player - Entities · NPCs, mobs, dropped items, and interactions
chatgpt/src/engine/mobs - UI · HUD, dialogue, trading, and game state views
chatgpt/src/engine/ui - Render · Voxel rendering and visual output
chatgpt/src/engine/render - Support · Audio, inventory, crafting, lighting, textures, and events
chatgpt/src/engine
claude
Layered browser voxel game
- Core · Engine and input coordination
claude/src/core - World · World state, chunks, generation, structures, and drops
claude/src/world - Entities · Mob AI, combat, spawning, and models
claude/src/entities - Player · Player physics and status effects
claude/src/player - Rendering · Meshing, particles, lighting, weather, water, and post-processing
claude/src/rendering - UI · HUD, inventory, menus, achievements, commands, and overlays
claude/src/ui - Support · Audio, textures, blocks, recipes, and utilities
claude/src
gemini
React-centric browser voxel game
- App · Top-level React composition
gemini/src/App.tsx - Store · Central slices for inventory, achievements, and mobs
gemini/src/store - Game · World, physics, and constants
gemini/src/game - Components · Player, chunks, mobs, and UI React components
gemini/src/components - Textures · Texture factory and mapping utilities
gemini/src/textures
grok
Minimal voxel demo
- App · Minimal React entry point
grok/src/App.tsx - Voxel World · Basic and simple voxel world components
grok/src/components/voxel - UI · Crosshair and minimal HUD
grok/src/components/ui
Connections 28
- Engine → World: updates · Coordinates chunk/world lifecycle
- Engine → Player: drives · Runs input and player control
- Engine → Entities: ticks · Advances mobs, NPCs, and drops
- Engine → UI: feeds state · Pushes game state to HUD and menus
- Engine → Render: renders via · Hands simulation state to renderer
- Engine → Support: orchestrates · Uses shared systems like audio and crafting
- Player → World: interacts with · Breaks blocks and changes world state
- World → Render: meshes into · Chunk data becomes geometry
- Entities → World: lives in · NPCs and mobs depend on world state
- Support → UI: supports · Inventory, crafting, dialogue, and trade UIs
- Core → World: runs · Owns chunk/world lifecycle
- Core → Player: routes input · Connects controls to player physics
- Core → Entities: coordinates · Advances entity spawning and AI
- Core → Rendering: feeds frames · Passes world and entity state to visuals
- Core → UI: updates · Synchronizes HUD and menus
- World → Rendering: meshes into · Chunk geometry enters rendering pipeline
- Player → World: affects · Physics and movement interact with terrain
- Entities → Rendering: appears in · Mob models, particles, and combat visuals
- Support → Rendering: enables · Textures, audio, and block definitions back presentation
- App → Store: reads/writes · React app binds to centralized store
- App → Game: uses · Consumes core mechanics and constants
- App → Components: composes · Builds the UI and scene from components
- Components → Store: subscribes to · Components render from shared store state
- Game → Components: drives world · World and physics state inform gameplay views
- Game → Textures: uses · Texture factory supports rendering
- App → Voxel World: renders · App mounts minimal voxel scene
- App → UI: shows · Adds minimal crosshair overlay
- Voxel World → UI: paired with · Scene and overlay form the demo experience