1 changed files with 50 additions and 0 deletions
@ -0,0 +1,50 @@ |
|||||||
|
# Isometric Game |
||||||
|
|
||||||
|
This repository contains the code for an isometric game built using Python and the Tkinter library. |
||||||
|
|
||||||
|
## Description |
||||||
|
|
||||||
|
The game includes a `Knight` class to represent a movable character and a `Cell` class to represent each tile in the game. The game map is represented using a 2D array of `Cell` objects, which can be either walkable or not. |
||||||
|
|
||||||
|
The `IsometricGame` class handles the game logic and user interactions such as keyboard presses and mouse clicks. |
||||||
|
|
||||||
|
## Usage |
||||||
|
|
||||||
|
To start the game, run the main.py file: |
||||||
|
|
||||||
|
```python |
||||||
|
python3 main.py |
||||||
|
``` |
||||||
|
|
||||||
|
## Features |
||||||
|
|
||||||
|
- **Isometric view**: The game uses an isometric perspective, giving it a pseudo-3D look. |
||||||
|
- **Keyboard controls**: The view can be moved around using the arrow keys. |
||||||
|
- **Mouse controls**: Cells can be selected by left-clicking on them. Right-clicking on a cell will move the knight to that cell if it is walkable. |
||||||
|
- **Editor mode**: Pressing the 'Tab' key toggles editor mode, where additional information about each cell is displayed and cells can be edited. |
||||||
|
- **Animations**: The knight has walking and idle animations which change depending on the direction he is moving in. |
||||||
|
|
||||||
|
## File Structure |
||||||
|
|
||||||
|
- **main.py**: This is the main script that runs the game. |
||||||
|
- **knight.py**: Contains the `Knight` class, which represents the player-controlled character. |
||||||
|
- **maze.json**: A JSON file representing the initial state of the game map. |
||||||
|
- **Tiles/**: This directory contains PNG images used as tiles for the game map. |
||||||
|
- **KnightBasic/**: This directory contains GIF images used for the knight's animations. |
||||||
|
- **Units/**: This directory contains the units used in the game. |
||||||
|
- **Effects/**: This directory contains different effects used in the game. |
||||||
|
|
||||||
|
## Dependencies |
||||||
|
|
||||||
|
- Python 3 |
||||||
|
- Tkinter |
||||||
|
- glob |
||||||
|
- os |
||||||
|
- json |
||||||
|
- time |
||||||
|
|
||||||
|
## Contributing |
||||||
|
|
||||||
|
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. |
||||||
|
|
||||||
|
Please make sure to update tests as appropriate. |
||||||
Loading…
Reference in new issue