How adautobenevides/game_retro works
This is a 2D top-down adventure game. The player starts from the menu, chooses a character, enters a house or outdoor world, and plays through movement, combat, pickups, and health/ammo tracking. Game owns the update/render loop and coordinates the menu, player, entities, world transitions, and presentation. The map loader, collision, enemies, shooting, and UI are supported by sampled source; the file tree also shows pickups, weapons, and audio, but their detailed runtime wiring was not sampled.
Main entry points: World.java World loader · Game.java Game loop · Player.java Player · Menu.java Menu and selection
Components 17
Game flow
- Menu and selection
src/com/daugames/main/Menu.java - Game loop
src/com/daugames/main/Game.java - Game states
src/com/daugames/world/GameState.java
World and collision
- World loader
src/com/daugames/world/World.java - House and doors
src/com/daugames/world/House.java - Tiles and props
src/com/daugames/world/Tile.java - Camera
src/com/daugames/world/Camera.java
Actors and combat
- Player
src/com/daugames/entities/Player.java - Enemies
src/com/daugames/entities/Enemy.java - Dog companion
src/com/daugames/entities/Dog.java - Projectiles
src/com/daugames/entities/BulletShoot.java - Pickups and weapons
src/com/daugames/entities/LifePack.java - Entity base
src/com/daugames/entities/Entity.java
Presentation
- HUD
src/com/daugames/graficos/UI.java - Sprite assets
src/com/daugames/graficos/Spritesheet.java - Audio
src/com/daugames/main/Sound.java
Other components
- Player
Connections 35
- Player → Menu and selection: chooses character
- Menu and selection → Game loop: starts game
- Menu and selection → Player: creates player
- Menu and selection → World loader: loads house
- Game loop → Game states: checks state
- Game loop → Menu and selection: updates menu
- Game loop → Player: updates entity
- Game loop → World loader: renders world
- Game loop → HUD: renders HUD
- Game loop → Game states: sets game over
- Player → World loader: checks collision
- Player → Enemies: checks overlap
- Player → Projectiles: fires
- Player → Camera: centers view
- Player → Game states: sets game over
- World loader → Tiles and props: builds map
- World loader → House and doors: loads houses
- World loader → Enemies: spawns enemies
- World loader → Pickups and weapons: spawns items
- World loader → Dog companion: spawns dog
- World loader → House and doors: checks door
- World loader → Camera: renders using
- Enemies → World loader: checks collision
- Enemies → Projectiles: detects hits
- Enemies → Game loop: removes self
- Dog companion → World loader: checks collision
- Projectiles → Entity base: extends
- Player → Entity base: extends
- Enemies → Entity base: extends
- Dog companion → Entity base: extends
- Tiles and props → Sprite assets: gets sprites
- Player → Sprite assets: gets sprites
- Menu and selection → Sprite assets: gets sprites
- Game loop → Audio: plays audio
- Game loop → HUD: supplies game state