A classic snake game implementation demonstrating SolarSail's entity management and grid-based gameplay.
- Arrow Keys or WASD: Change snake direction
- R: Restart game after game over
- Q: Quit game
- Control the snake to eat red food squares
- Each food eaten increases your score by 10 points
- The snake grows longer with each food eaten
- The game speeds up as you eat more food
- Game ends if you hit the walls or yourself
- Grid-based movement (30x20 cells)
- Dynamic entity creation/destruction for snake segments
- Sprite atlas with snake and food sprites
- Collision detection for walls, self, and food
- Speed increase mechanic
- Score tracking
-
game_controller.lua: Main game logic
- Snake movement and growth
- Food spawning
- Collision detection
- Input handling via message broadcasting
-
config.lua: Game configuration
- Grid dimensions
- Speed settings
- Visual parameters
-
Coordinate System:
- Grid coordinates (0,0) to (29,19)
- Converted to world coordinates with center origin
cd /home/dagostinelli/projects/solarsail/snake
make run- Center-origin coordinate system
- Entity component system for dynamic objects
- Message broadcasting for input handling
- Transform manipulation for movement
- Sprite atlas for visual assets
