- game
- Network script
- Functioning network script
- Networking script that works
- Good enough networking script
Step by step guide on how to install the project :)
git clone https://github.com/dimapodgorny/py21.git
cd py21
python.exe -m venv py21env
On powershell:
Set-ExecutionPolicy Unrestricted -Scope Process
py21env\Scripts\Activate.ps1
/py21env/Scripts/python.exe -m pip install -r requirements.exe
You can either run the project normally, or by running the network script for debugging.
Assuming you already have app.py open, (if you don't, run python.exe ./app.py
)
This is pretty much it, as for example if you try hosting or joining a server it will break or crash for now.
Congratulations you've run the app.
-
Start the script
python.exe ./_network_.py
-
You will be prompted to either host or join a server, enter
host
-
Enter the desired IP address when prompted to. Your server will be hosted on this address.
-
Enter the desired port when prompted to.
-
Start the script
python.exe ./_network_.py
-
You will be prompted to either host or join a server, enter
join
-
When prompted to, enter the IP address the server is hosted on.
-
Enter the port of the server when prompted to.
Congratulations! You can now send messages by writing a something and pressing enter. The message will be broadcasted to everyone other client. Or alternatively you can use commands by prefixing it's "id" with /
. Use /help
for a list of commands.