Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cainky/quakeliveinterface
Interact with game state [in progress]. The idea is to use it to train AI agent for Duel
https://github.com/cainky/quakeliveinterface
game gamedev help-wanted quake quake-live quake3 quake3-engine quakelive
Last synced: about 1 month ago
JSON representation
Interact with game state [in progress]. The idea is to use it to train AI agent for Duel
- Host: GitHub
- URL: https://github.com/cainky/quakeliveinterface
- Owner: cainky
- License: gpl-3.0
- Created: 2023-08-06T17:02:30.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-07T22:44:36.000Z (6 months ago)
- Last Synced: 2024-07-07T23:42:55.840Z (6 months ago)
- Topics: game, gamedev, help-wanted, quake, quake-live, quake3, quake3-engine, quakelive
- Language: Python
- Homepage:
- Size: 66.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# QuakeLiveInterface
Quake Live Interface is a Python library designed to provide a programmatic interface to a Quake Live game server. The library's main components are:
- `ServerConnection`: A class that manages the TCP/IP connection to the Quake Live server. It sends commands to the server and receives data packets from the server.
- `GameState`: A class that parses the data packets from the server into a more accessible format. The game state includes information about the player's position, the positions of other entities, and other game state information.
- `QuakeLiveClient`: A class that encapsulates the connection to the server and the interpretation of game state data. It provides an intuitive interface for users to interact with the game.
## Installation
The project uses Poetry for package management.
```bash
$ poetry install
```### Usage
To create a connection to a Quake Live server:
```python
from QuakeLiveInterface.connection import ServerConnection
connection = ServerConnection(server_ip, server_port)
connection.connect()
```To send a command to the server:
```python
connection.send_command("some_command")
```To create a Quake Live client and interpret game state data:
```python
from QuakeLiveInterface.client import QuakeLiveClient
client = QuakeLiveClient(server_ip, server_port)
client.connect()
game_state = client.get_game_state()
```### Testing
To run tests:
```bash
$ poetry run pytest
```