How javier0f/juego-de-naves works
This is a Macroquad-based Asteroids-style arcade game. The main loop initializes the world and game, dispatches menu/run/end behavior, and in the running state coordinates player input, bullets, particles, rendering, collisions, and the life display. Restarting rebuilds player, asteroid, and particle state. The graph preserves the distinct gameplay systems and their shared ECS components; the README is empty, and unsampled source is not used to infer additional behavior.
Main entry points: main.rs Game Loop · components.rs ECS Components · menu.rs Menu and Restart · player.rs Player Control
Components 13
Game Runtime
- Game Loop
src/main.rs - Menu and Restart
src/states/menu.rs - UI Styling
src/ui_style.rs
Gameplay Systems
- Collision
src/collision.rs - Life Display
src/lifebar.rs
Entity Systems
- Player Control
src/entitys/player.rs - Asteroids
src/entitys/asteroids.rs - Bullets
src/entitys/bullets.rs - Particles
src/entitys/particles.rs
Shared State
- Game State
src/states/game_state.rs - ECS Components
src/components.rs
Other components
- Player
- Game Display
Connections 23
- Player → Player Control: provides input
src/entitys/player.rs - Game Loop → Game State: reads state
src/main.rs - Game Loop → Menu and Restart: dispatches menu
src/main.rs - Game Loop → Player Control: runs control
src/main.rs - Game Loop → Bullets: updates bullets
src/main.rs - Game Loop → Particles: updates particles
src/main.rs - Game Loop → Asteroids: moves and renders
src/main.rs - Game Loop → Collision: runs collisions
src/main.rs - Game Loop → Life Display: updates life
src/main.rs - Game Loop → UI Styling: loads skin
src/main.rs - Game Loop → Game Display: draws frame
src/main.rs - Menu and Restart → Game State: switches state
src/states/menu.rs - Menu and Restart → Player Control: creates player
src/states/menu.rs - Menu and Restart → Asteroids: creates asteroids
src/states/menu.rs - Menu and Restart → Particles: reinitializes system
src/states/menu.rs - Bullets → Asteroids: damages asteroids
src/entitys/bullets.rs - Bullets → ECS Components: queries components
src/entitys/bullets.rs - Player Control → ECS Components: queries components
src/entitys/player.rs - Asteroids → ECS Components: queries components
src/entitys/asteroids.rs - Particles → ECS Components: queries components
src/entitys/particles.rs - Collision → ECS Components: queries components
src/collision.rs - Life Display → ECS Components: reads life and position
src/lifebar.rs - Life Display → Game State: ends game
src/lifebar.rs