Lasertag
Turn any space into a laser tag arena with a single press
Lasertag (one word) is an experiment in reducing the friction & 'time to fun' of mixed reality games with something that 'just works.'
It progressively scans and syncs room geometry between all players without any 'room setup' process and connects nearby headsets automatically.
The game runs on Meta Quest 3/3s and is built on Unity using their first-party Netcode for GameObjects package.
Website ➔
GitHub repo ➔
Simple setup
- 1. Everyone puts on their headset
- 2. Everyone connects to the same WiFi network
- 3. Everyone launches the app
- 4. One person presses the 'host' button
From there, all nearby headsets (should) connect and colocate automatically.
Room mapping
Progressive and network-synced
I use Quest's depth texture to progressively scan the playspace (rooms, walls, furniture, etc.) and build a heightmap that I also sync between all headsets. This means that if Headset #1 isn't close enough to see what Headset #2 is hiding behind, #2 will still tell #1 that something is there.
Currently, I only use this network-synced heightmap for bullet collision, but I plan on testing everything from fire-spreading molotovs to a Splatoon-like game mode.
For each headset, a compute kernel samples the Quest's depth texture and writes to a per-frame uint32 heightmap texture using InterlockedMax and some filtering rules (such as ignoring depth-samples with extreme gradients as edges). I then write this to a persistent float texture, as well as stream the per-frame updates between headsets using Unity Netcode's FastBufferReader/Writers.
Depth lighting
Laser's lights are inverted sphere meshes with a depth/normal-sampling shader. They're like rudimentary deferred point lights.
These are expensive (alpha blended fragments that often overlap and cover the whole view) and I still need to optimize them.
Download
The game is still pretty bare-bones. There are no objectives, rounds, teams, etc. Only you, your friends, and laser guns. If you'd like to try it out, you can join the beta release channel:
Beta Release Channel ➔
Discord ➔ If you run into any issues or have any feedback, please reach out by email or join the discord.
GitHub repo ➔ The project is available on GitHub under the MIT license. Feel free to reference (or steal) code for your own projects :)
Website ➔ details some known issues and includes credits for other contributors and playtesters.