This app demonstrates the usage of UDP Sockets using the HARFANG API in Python in order to link a server and one or more clients.
It also includes some basic client prediction and interpolation.
To run the prototype:
- Download or clone this repository to your computer (eg. in
C:/server_client_3D
). - Download assetc for your platform from here to compile the resources.
- Drag and drop the resources folder on the assetc executable -OR- execute assetc passing it the path to the resources folder (eg.
assetc C:/server_client_3D/server_client_demo
).
After the compilation process finishes, you will see a server_client_demo_compiled
folder next to resources ( server_client_demo
) folder.
You can now execute the server from the folder you unzipped it to.
C:/server_client_3D>python server.py
You can then execute as many clients as you'd like with the following command (you will get limited by packet size at some point which is a problem I need to fix).
C:/server_client_3D>python main.py
Make sure to reference the correct IP and have your ports open on local AND online networks.