Multiplayer Server Client for Dani's Race
Find a file
2026-07-02 17:37:38 +03:00
api.py Shit, i'm dumb 2025-03-31 18:22:59 +03:00
client.py YES!!! 2025-03-24 14:10:16 +02:00
config.json binding to 0.0.0.0 2025-03-23 14:46:44 +02:00
handler.py just a little while loop 2025-03-24 14:12:35 +02:00
LICENSE Initial commit 2025-03-18 00:12:34 +01:00
README.md Changes to the readme. 2026-07-02 17:37:38 +03:00
server.py prints 2025-03-25 14:48:49 +02:00

Dani's Race Multiplayer

The server / client stack for Dani's Race.

Installation / Testing

To install this you need clone the repository:

git clone https://forg.madiator.cloud/BlenderDumbass/DanisRace_Multiplayer

It will download the folder DanisRace_Multiplayer to your computer. So now you can navigate to said folder:

cd DanisRace_Multiplayer

And launch the server software:

python3 server.py

You may want to setup port forwarding to have your server visible from the global network.

To test that everything works, you can use client.py script.

Part of the client.py file:

hostname = "95.216.112.32"
port     = 7860

As you can see it wants to connect to 95.216.112.32 port 7860 by default. At one point that was a server we used for development on Dani's Race Multiplayer. You may want to change the code to your server's IP and Port to make it connect.

Methods

Those are the methods you can type in the client.py program to make it do things. When connecting to the server via Dani's Race, this is the interface that is used for the game.

START GAME

Starts a new game on the server

Request

{"new_game":"Game"}

Response if the game isn't yet created:

{"new_game":"Game"}

Response if the game is already created:

{"new_game":"Game_2"}

LIST GAMES

Lists all games currently on the server

Request:

{"games":null}

Response:

{"games":["Game", "Game_2"]}

JOIN GAME

Join a game on a server.

Request:

{"join":"Game"}

Response if game is found:

{"join":"Game"}

LIST USERS

Lists all users on the server

Request:

{"players":null}

Response:

{"players":["Player_1", "Player_2"]}

GET USERNAME

Gets your current username

Request:

{"username":null}

Response if the name is not taken:

{"username":"BlenderDumbass"}

CHANGE USERNAME

Request:

{"username":"BlenderDumbass"}

Response if the name is not taken:

{"username":"BlenderDumbass"}

Response if the name is taken:

{"username":"BlenderDumbass_2"}

ALLOCATE IDS

Request from the server to give proper IDs that can be used for object's netIds in the game.

Request ( int for the number of IDs ):

{"ids":3}

Response ( list of the ids ):

{"ids":["hy4g","is8j", "5yg4"]}