Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```