Welcome to the official repository of the Photon Laser Tag software! This Java-based application is designed to power the classic Photon Laser Tag experience, providing team management, game mechanics, and more.
The Photon Laser Tag Java application serves as the main software for managing and playing Photon Laser Tag games. Whether you're hosting a casual game or organizing a tournament, this software provides the essential tools needed to ensure a seamless laser tag experience.
- Team Management: Easily manage red and green teams.
- Game Mechanics: Enforce game rules and track scores.
- Networking: Support for UDP connections to sync and transmit game data across different systems.
- Database Integration: Persistent storage using PostgreSQL for player ID and Codename.
Before you begin, ensure you have the following installed on your system:
-
Java Development Kit (JDK): Version 21
-
Check your Java version in the VM's terminal:
java --version -
If your version is anything other than 21, navigate to this link in the VM's Web Browser
-
Download the correct package for your Linux machine. For us, it was the x64 Debian Package
-
After downloading, the package should be in your ~/Downloads folder. Navigate to that in a terminal.
-
Next, we need to de-package the .deb file. Within the ~/Downloads directory, run this command in the terminal:
sudo dpkg -i jdk-21_linux-x64_bin.deb. At this point, Linux does a bunch of the work for us. -
Now, the Java version should have automatically switched to version 21. To double check, run the
java --versioncommand.
-
If for any reason you do not have the correct Java version listed, we must run a couple commands to change it.
-
Run the
sudo update-alternatives –config javacommand to open up a menu. Choose the correct Java version. -
Run the
sudo update-alternatives -config javaccommand. Choose the correct Java Compiler version.
-
-
-
Apache Maven: For project build management
-
Check if Maven is installed on your VM by typing:
mvn --versionon your terminal. -
If not, type
sudo apt install maven
-
-
PostgreSQL: For database management (This program uses a VM that runs the PostgreSQL Database)
- Clone the repository:
gh repo clone Weston-Cox/Photon_LaserTag cd Photon_LaserTag - Install Dependencies
mvn clean install
- Compile the Application
mvn clean compile
-
Before attempting to run the application, we must do two things:
-
Start the virtual machine (self-explanatory)
-
Run the edited traffic generator within the repo.
- To do this, navigate to the \Helpers directory from the root of the project.
cd src/main/java/com/photon/Helpers - Then, run the
python_trafficgenerator_v2.pyby typing your respective python command:python3 python_trafficgenerator_v2.py
- The terminal should then prompt you to type in the equipment IDs for the red and green players. Be sure to type the exact same equipment IDs that you entered in the Initial Screen.

- To do this, navigate to the \Helpers directory from the root of the project.
-
-
To run the application, use the following command:
mvn exec:java