This is a project for the University of Arkansas to recreate the original commercial version of laser tag's (Photon: The Ultimate Game on Planet Earth) game control server.
NOTE: This program cannot be used directly with the original Photon hardware. Modified hardware that can communicate over UDP is required.
Running this program requires the pre-configured Virtual Box VM located here. All following steps should be performed within the running virtual machine.
# Clone the repo
git clone https://github.com/LongGameLuke/Lasers11.git
# Enter repo directory
cd Lasers11/# Install the required dependencies
./install.sh
# This script will launch the Photon Laser Tag program after installing# After installing the first time, you can run the program regularly with:
python3 run.pyIn the event the auto install and run script doesn't work, you can perform the steps below manually.
# Make sure pip is installed
sudo apt update && sudo apt install pip -y
# Install dependencies from requirements.txt
pip install -r requirements.txt
# Run program
python3 run.pyThe game server will broadcast and receive several codes that can be used to communicate with the player clients. These signals are communicated by UDP on the ports and host specified in config.yml.
After a countdown of a specified length in config.yml, the game server will send the start code to the player clients. When the full game time has elapsed or the game is stopped manually, the game server will send the end code.
202 = Start game
221 = End game
Tag events are sent from clients to the game server and follow the following format:
<tagger hardware id>:<tagged hardware id>
After the game server registers the tag event, the tagged player's hardware id will be broadcast back. This is used by the player client to know their unit should become shortly disabled.
When a team's base is tagged, the player client will send the base tag code to the game server in the same format as a regular tag event. The game server will send back the id of the base that was tagged. The player client will remember this event and can only occur once per player per game.
43 = Green base tagged by red player
53 = Red base tagged by green player
