Lasertag
I have produced several implementations and peripherals for a local lasertag company. I am able to apply my expertise in game design and programming to a real-life activity
Contents
-How it started
-Domination Box
-Turret
-Milestag Protocol in detail

How it started
It began when I was learning how to use Arduino development boards. And received an Infrared signal from one of the taggers shooting. This signal (represented as an array of values) could be transmitted and would do damage to a tagger as if it came from one.
Respawns
Referee commands such as RESPAWN also used infrared signals. This meant that respawn stations could be created using Arduino circuits rather than the referee having to do it (or buying official gear- £££!)

Domination Box
I started deciphering the infrared signals, which values mean what. Through trial and error it was deduced which values determined what team the player is on.
This breakthrough allowed for the creation of a domination module (shown left). Including 3 game modes:
-Classic Domination
-Raise the flag
-Tug of war
Turret
IN PROGRESS - A sweeping turret that guns down players. Another obstacle to watch out for in the lasertag arena.
The programming and circuitry has been done. It needs more testing and then just the finishing touches: a cool paintjob.


The Milestag Protocol in more detail
The infrared signals, or 'shot packets' sent by the taggers all follow a certain protocol.
After finding documentation on this protocol I learned how the shot packets are generated. The documentation (https://openlasertag.org/language/en/milestag-2-protocol/) describes the 600μs space between representative bits. Also that 600 = binary 0 and 1200 = binary 1.
In other words every other value is a 600 and means nothing in terms of decoding the shot packet's data
In the array of numbers on the left, you would only look at the numbers underlined in blue.
Decoding shot packets
There are 3 pieces of information given in a standard shot packet: The player ID (who shot you), the team ID (what team they are on), and the damage index (how much damage they did).
The Milestag documentation helpfully outlines the arrangement of these attributes:
Header - 1 bit
Player ID - 7 bits
Team ID - 2 bits
Damage index - 4 bits

A shot packet consists of 32 values, but only 16 of these mean something. With 600 and 1200 representing 0 and 1 binary digits.
The image on the right highlights the information: player ID, team ID and damage index
Player ID = 0 0 0 1 0 1 1 (BIN) = 11 (DEC)
Team ID = 0 1 (BIN) = 1 (DEC) = Blue team
Damage index = 0 1 0 1 (BIN) = 5 (DEC)
The damage index is applied to a lookup table. 5 returns a damage value of 10 health points, the actual amount of health taken from the player.


