A Backpack Battles-inspired autobattler with Sentry error monitoring theme.
autobattler/
├── client/ # Godot client (UI and game logic)
│ ├── project.godot
│ ├── scenes/ # Game scenes
│ └── scripts/ # GDScript files
├── server/ # Python FastAPI server
│ ├── main.py # API endpoints
│ ├── battle_engine.py # Battle simulation
│ └── item_effects.py # Item definitions
└── docs/ # Game design documentation
- Python 3.10+
- Godot 4.3
- pip
- Install Python dependencies:
cd server
pip install fastapi uvicorn pydantic- Start the server:
python main.pyThe server will run on http://localhost:8000
- Open Godot 4.3
- Import the project from the
client/directory - Open the project
- Start Game: Click "Start New Game" from the main menu
- Shop Phase:
- Buy items from the shop (costs gold)
- Drag items from shop to your inventory grid
- Arrange items in your 7x9 server rack
- Items can be dragged to reposition
- Right-click or Shift+click to sell items (50% value)
- Battle Phase:
- Click "Start Battle" when ready
- Watch the automated battle unfold
- Items activate on timers using CPU cycles
- Results:
- Win: Continue to next round with more gold
- Lose: Lose health, continue if health > 0
- Game Over: When health reaches 0
- Victory: Win 10 matches
- Left Click: Select/place items
- Drag: Move items in inventory
- Right Click: Remove item from grid
- Shift+Click: Sell item for gold
- Problems/Bugs (Weapons): Deal damage on timers
- Monitoring (Shields): Block incoming attacks
- Infrastructure (Support): Provide buffs and resources
- Food: Healing and regeneration
- Pets: Automated helpers
- Consumables: One-time use items
cd server
python -m pytest test_battle_engine.py -v- InventorySystem: Drag-and-drop grid inventory management
- ShopSystem: Item shop with rarity-based pricing
- BattleVisualization: Animated battle playback
- ServerAPI: Communication with Python backend
POST /session/start- Start new game sessionPOST /shop/refresh- Get new shop itemsPOST /battle/simulate- Run battle simulationPOST /purchase/item- Buy item from shopPOST /sell/item- Sell item for gold
✅ Game session management ✅ Shop system with item generation ✅ Drag-and-drop inventory ✅ Battle simulation ✅ Item rarity system ✅ Health/gold management ✅ Win/loss conditions ✅ Battle visualization
- Multi-square items
- Item combining/recipes
- Container items (server racks)
- Adjacency bonuses
- Multiplayer matchmaking
- Leaderboards
- Save/load games
- Sound effects
- Particle effects
- Items are managed client-side for responsiveness
- Server validates and simulates battles deterministically
- Battle results include full event timeline for replay