Softeq wanted to explore Microsoft’s new AR platform—Microsoft HoloLens. Our gaming department decided to develop a HoloDefense game. It’s a tower defense strategy game in a space setting.
The game had to offer lifelike game physics and natural sound effects. The app would be designed in Unity 3D and powered by Windows Mixed Reality. To make HoloDefense more immersive, all sounds would have to be in stereo and attached to virtual objects.
HoloDefense is the latest Augmented Reality gaming app Softeq has been working on to explore Microsoft’s new AR platform – Microsoft HoloLens. It’s a Tower Defense strategy in space settings. The player’s goal as the air defense commander is to protect a plasma factory from enemy spaceships appearing from portals.
How Augmented Reality Works in HoloDefense
To start playing HoloDefense — you need to scan 40 square meters of space. When you look at the objects around — HoloLens recognizes them with 4 environment understanding cameras and scans with holographic processing unit (so called mapping process).
When enough room space is scanned, HoloLens builds a complete 3D model of the room — the actual playground where space warfare will take place. The headset uses it to place virtual objects (portals, enemy spaceships) in appropriate locations and track your movements inside the room.
Placing virtual objects
Then you choose a place where to deploy your plasma factory. Any scanned flat surface is suitable — table, floor etc. The same rule works for turrets and other virtual objects.
Manipulating virtual objects with hand gestures
After the base deploys, enemy spaceships appear from portals and start attacking it. You must place the turrets around the factory to defend it. You manipulate the turrets with the hand gestures supported by HoloLens — tap and hold.
Tech Stack: Unity and Windows Mixed Reality
Microsoft declares Unity as “the fastest path to build a mixed reality app”. The Softeq Unity developers leveraged multiple engine tools to create an immersive AR experience in HoloDefense. NVIDIA PhysX engine is responsible for lifelike game physics — enemy spaceships, when damaged, fall on the floor or table. 3D models were animated in Unity Animator.
JSON CONFIG FOR REAL-TIME BALANCING
The game logic is configured by 96 game settings (such as main base health, tower gun radius, enemy speed or portal’s build range). The config file is stored on the cloud, in JSON format. It allows game designers to balance the game settings in real time, without recreating the build.
The sounds are stereo and attached to the virtual objects — it makes HoloDefense game more immersive. If the missile explodes behind you — you will hear it from behind, as in a real battle. You’re walking away from the holographic sound source — and the volume is fading. It feels natural.
The Softeq game artists created models of a plasma factory, several types of turrets, enemy spaceships, and portals. All the models are: