Tiletopia is a casual 2D top-down city builder built in Pygame. It features dynamic Sims, pathfinding vehicles, economy and zoning systems, and a tile-based construction mechanicโall rendered in real time with zoom and pan support.
- ๐งฑ Tile placement: roads, houses, factories, zoning
- ๐ฅ Sim agents with home and job logic
- ๐ Vehicles using A* pathfinding
- ๐๏ธ Real-time economy and income generation
- ๐ Smooth zoom/pan camera
- ๐พ Save/load system for maps
| Key / Input | Action |
|---|---|
| Mouse Left Click | Place selected tile/tool |
| Mouse Middle Drag | Pan the map |
| Mouse Wheel | Zoom in/out |
W, A, S, D |
Move camera |
S (key) |
Save map |
L (key) |
Load saved map |
git clone https://github.com/YOUR_USERNAME/Tiletopia.git
cd Tiletopia
2. Create and activate virtual environment
python -m venv venv
.\venv\Scripts\Activate.ps1 # PowerShell
# OR
venv\Scripts\activate.bat # CMD
3. Install requirements
pip install -r requirements.txt
๐ Run the Game
python src/main.py
๐ Project Structure
arduino
Copy
Edit
Tiletopia/
โโโ assets/ # (future tiles, sounds, etc.)
โโโ src/
โ โโโ camera.py
โ โโโ config.py
โ โโโ economy.py
โ โโโ game.py
โ โโโ main.py # Game entry point
โ โโโ map.py
โ โโโ pathfinding.py
โ โโโ player.py
โ โโโ sim.py
โ โโโ tile.py
โ โโโ ui.py
โ โโโ utils.py
โ โโโ vehicle.py
โโโ map.json # Saved map data
โโโ requirements.txt
โโโ venv/ # Local virtual environment
โโโ README.md
๐ License
MIT License โ build, remix, and share freely!
๐จโ๐ป Author
Made by Ash
Enjoy the tiles, chaos, and charm!