p2p-arcade
This is a demonstration package illustrating the use of python_banyan in creating a peer-to-peer game using arcade.
Install
Windows:
pip install p2p-arcade
Linux/macOS
sudo pip3 install p2p-arcade
usage: p2p_arcade.py [-h] [-b BACK_PLANE_IP_ADDRESS] [-n PROCESS_NAME]
[-p PLAYER]
optional arguments:
-h, --help show this help message and exit
-b BACK_PLANE_IP_ADDRESS
None or Common Backplane IP address
-n PROCESS_NAME Banyan Process Name Header Entry
-p PLAYER Select player 0 or 1
After installation, to run the demo on a single computer, start player 0 (the coins) by opening a terminal and typing:
p2pa
Next open a second terminal and type:
p2pa -p 1
This will open player 1's window (the human sprite). Move the mouse into this window, click the left mouse button to start the coins moving. Now click the right mouse button and start to collect the coins.
If you wish to run this as a distributed application, after opening up player 0's window, note the IP address being used by the backplane.
************************************************************
Arcade p2p player0 using Back Plane IP address: 192.168.2.192
Subscriber Port = 43125
Publisher Port = 43124
Loop Time = 0.0001 seconds
************************************************************
192.168.2.192 is the address that the backplane selected.
Now to start a second copy of p2pa on the second computer, specifying both player 1 with the -p 1 option and the backplane address with the -b option. Use the IP address noted when opening the first window:
p2pa -p 1 -b 192.168.2.192
Release files for p2p-arcade 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| p2p_arcade-0.2.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| p2p_arcade-0.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 26.9 kB
Release files / p2p_arcade-0.2.tar.gz
| Download URL | p2p_arcade-0.2.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ac95ce40f7a67341058c2ff4b0fb8558ea56299f104b268b8936761e6220720
|
|
BLAKE2b-256 checksum How to use checksums |
bd96d39a9b0c6648a290d8a6b66b889a14e0c721bc0066fce8de38016f3117d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|
Release files / p2p_arcade-0.2-py2.py3-none-any.whl
| Download URL | p2p_arcade-0.2-py2.py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
957bba73874e8eff1add49525e38708848e134dda217555538e76c58a8769f08
|
|
BLAKE2b-256 checksum How to use checksums |
8a13c587813a4e2d86b6c3db2978a271b0f9ca782daabd609853bd8f095cfcc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.7.5
|