WarLab is a multiplayer turn-based combat game built with Python and Tkinter, utilizing a client-server architecture for network play.
- Network Multiplayer: Play against friends over a local network or internet connection
- Turn-Based Combat: Strategic gameplay with attack, defend, and heal actions
- Simple GUI: Easy to understand interface built with Tkinter
- Configurable Game Logic: Adjust combat parameters through configuration file
- Python 3.6+
- Tkinter (usually included with Python installation)
- Network connectivity for multiplayer
-
Clone the repository:
git clone https://github.com/yourusername/WarLab.git cd WarLab -
No additional dependencies are required beyond Python with Tkinter
- Run the game:
python main.py - Select "Create Server"
- Configure server port (default: 5555)
- Click "Start Server" and wait for a player to connect
- Run the game:
python main.py - Select "Connect to Server"
- Enter server IP address and port
- Click "Connect"
-
Players take turns choosing one of three actions:
- Attack: Attempt to damage your opponent
- Defend: Reduce incoming damage on your opponent's next turn
- Heal: Restore some of your health
-
The game continues until one player's health reaches zero
- Attack: Has an 80% chance of success. Deals 10-20 damage when successful.
- Defend: Has a 70% chance of success. Reduces incoming damage by 50% when successful.
- Heal: Has a 60% chance of success. Restores 5-15 health points when successful.
These values can be adjusted in the config.json file.
Game parameters can be adjusted in the config.json file:
{
"attack": {
"success_chance": 0.8,
"damage_range": [10, 20]
},
"defend": {
"success_chance": 0.7,
"damage_reduction": 0.5
},
"heal": {
"success_chance": 0.6,
"heal_range": [5, 15]
},
"initial_health": 100
}WarLab uses a client-server model where:
- The server maintains the authoritative game state
- Clients send action requests to the server
- The server processes actions and sends results to clients
- All random number generation happens server-side for fairness
For detailed information about the network protocol, see networking_documentation.md.
WarLab includes a comprehensive logging system that:
- Logs game events to console
- Creates timestamped log files in the
logsdirectory - Displays current status in the GUI status bar
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Damien Boisvert (AlphaGameDeveloper)