367a839c8a
enemy as to be checked
56 lines
2.4 KiB
Markdown
56 lines
2.4 KiB
Markdown
# README
|
|
|
|
## Strcuture
|
|
|
|
pixel_tower_defense/
|
|
|
|
|
|-- main.py Entry point. Instantiates Game and calls run().
|
|
| Editor is commented out but importable.
|
|
|
|
|
|-- editor.py Standalone map editor (separate from the game loop).
|
|
| Run by swapping the commented lines in main.py.
|
|
|
|
|
|-- requirements.txt Python dependencies (pygame, pygame_gui).
|
|
|
|
|
|-- assets/
|
|
| |-- images/
|
|
| | |-- tiles/
|
|
| | | |-- test/ Base/test tile set
|
|
| | | |-- jungle/ Jungle tile set
|
|
| | | `-- desert/ Desert tile set (currently active in gameplay)
|
|
| | `-- entities/
|
|
| | |-- enemies/
|
|
| | | `-- enemy.png Single enemy sprite
|
|
| | `-- towers/
|
|
| | `-- cannon/
|
|
| | |-- shoot/ Animation frames (0.png, 1.png, ...) for the shoot action
|
|
| | `-- red_cannon.png Red tint variant shown when placement is blocked
|
|
| |-- maps/
|
|
| | `-- desert.json Serialised tilemap for the desert level,
|
|
| | contains: tilemap dict, tile_size, waypoints list
|
|
| `-- theme/
|
|
| `-- theme.json pygame_gui UI theme configuration
|
|
|
|
|
`-- game/
|
|
|-- game.py Core Game class (window, clock, asset loading, screen routing)
|
|
|-- camera.py Camera class (pan + zoom, world<->screen coordinate conversion)
|
|
|-- tilemap.py Tilemap class (load/save JSON maps, tile rendering, placement rules)
|
|
|-- enemy.py Enemy, EnemyGroup, HealthBar classes
|
|
|-- tower.py Tower, TowerGroup classes
|
|
|-- util.py Image loaders, coordinate converters, Animation class
|
|
`-- screens/
|
|
|-- base_screen.py Abstract base class for all screens
|
|
|-- main_menu.py Main menu screen (Play / Quit buttons)
|
|
`-- game_play.py Gameplay screen (tilemap, enemies, towers, camera, UI)
|
|
|
|
## Start the Game
|
|
|
|
python main.py
|
|
|
|
check with pylint
|
|
pylint game/
|
|
|
|
|
|
### Strcuture is written with Claude
|
|
### Ai was used as a thinking aid tool, only small parts are written with ai, most of the code is written by ScriptSorcerer
|
|
### For resources, Coding with Russ and Fluffypotato helped me alot. |