How xpac27/littleworld works
Little World is an in-development 3D game: the application entry point initializes and drives Game, which owns the World. The world manages entities, pathfinding, and camera-facing render collections; the camera draws meshes, sprites, and lights, including the README-documented lighting and shadows capability. The graph also shows the graphics and math layers used by those subsystems. Some implementation excerpts were unavailable, so relationships are limited to visible declarations, indexed references, and README statements; uncertain runtime calls are omitted.
Main entry points: World.h World · Camera.cpp Camera · Mesh.cpp Mesh · Dynamic.cpp Dynamic Entities
Components 24
Application
- Application Entry
src/main.cpp - Game Controller
src/game/Game.cpp
World and Gameplay
- World
src/scene/World.h - Pathfinder
src/ai/Pathfinder.cpp - Dynamic Entities
src/scene/entity/Dynamic.cpp - Player Entity
src/scene/entity/dynamic/Player.cpp - Enemy Entity
src/scene/entity/dynamic/Enemy.cpp - Static Entities
src/scene/entity/Static.cpp - Decor
src/scene/entity/static/Decor.h - Emitter
src/scene/entity/static/Emitter.h - Entity Base
src/scene/Entity.h
Rendering
- Camera
src/scene/Camera.cpp - Mesh
src/graphics/object/Mesh.cpp - Sprite
src/graphics/object/Sprite.cpp - Light and Shadows
src/graphics/object/Light.cpp - Render Object
src/graphics/Object.cpp - Vertex Buffers
src/graphics/VBO.cpp
Math and Resources
- Vector Math
src/math/Vector3.cpp - Vector Utilities
src/math/Vector3Util.cpp - Matrices
src/math/Matrix4x4f.cpp - View Frustum
src/math/Frustum.cpp - Shared Graphics and Grid Data
src/resources/Structs.h - Notifications
src/resources/Notifications.h
Other components
- Player
Connections 34
- Player → Application Entry: starts
- Application Entry → Game Controller: runs
src/main.cpp - Game Controller → World: drives
- World → Camera: owns
src/scene/World.h - World → Pathfinder: owns
src/scene/World.h - World → Dynamic Entities: manages
src/scene/World.h - World → Static Entities: manages
src/scene/World.h - World → Player Entity: creates
src/scene/World.h - World → Enemy Entity: creates
src/scene/World.h - World → Decor: creates
src/scene/World.h - World → Emitter: manages
src/scene/World.h - Dynamic Entities → Entity Base: extends
- Static Entities → Entity Base: extends
- Player Entity → Dynamic Entities: extends
- Enemy Entity → Dynamic Entities: extends
- Decor → Static Entities: extends
src/scene/entity/static/Decor.h - Camera → Mesh: draws
- Camera → Sprite: draws
- Camera → Light and Shadows: draws
- Mesh → Light and Shadows: uses lighting
- Mesh → Render Object: extends
- Sprite → Render Object: extends
- Light and Shadows → Render Object: extends
- Mesh → Vertex Buffers: uses buffers
- Sprite → Vertex Buffers: uses buffers
- Vertex Buffers → Shared Graphics and Grid Data: uses vertex data
- Pathfinder → Entity Base: registers
- Pathfinder → Vector Math: returns paths
- Vector Utilities → Vector Math: operates on
- Matrices → Vector Math: uses
- View Frustum → Matrices: uses
- View Frustum → Vector Math: uses
- Camera → View Frustum: tests visibility
- Player Entity → Notifications: uses events