What is it
AR Skirmish is part of the MekaMon app.
It's a gamemode where you fight virtual enemies in augmented reality, using either your physical MekaMon robot, or a virtual MekaMon robot!
- The app was built in Unity, using C#
- Bluetooth LE (BLE) is used to communicate with the MekaMon Robot
- ARKit & ARCore markerless tracking, plane detection & feature point detection
- Custom computer vision solution for tracking the MekaMon robot
What did I do
AR Skirmish was a collaboration between the games team at Reach Robotics. I was a lead programmer on the team, and worked together with the other programmers, artists and designer to create a unique and interesting AR gamemode.
I worked on many different parts of the gamemode and the tech, some of the interesting highlights can be found below.
Fight virtual enemies using your MekaMon robot, or a virtual version of it!
Bring the real world into the game, the play space adapts to fit your environment!
Varied and challenging AI
High quality visual effects
Here's some of the interesting things I had to implement for this feature:
World Tiling System
- The play area adapts to the environment you play in. We use the planes provided by ARCore/ARKit to decide the floor your robot is sitting on, then the feature points are split into buckets based on their position, weighted based off various factors, and used to decide which tiles are clear floor space, and which are walls or possible obstacles that the MekaMon robot can't pass
- This data is then fed into our tiling system, which is then visualized to the user by custom meshing & shaders I wrote to show the boundaries of the playspace, and also fed into the AI for navigation.
- The playspace is dynamic and updates while you play - areas that your physical MekaMon walk over will also be marked as valid!
Advanced Effects System
- One of the requirements was for each attack to have bespoke, complex effects, perfectly timed to match the physical animations of the robot
- I created a layered system for this, allowing the artists and designers to easily tweak which effects are used, what they target, how they move and at what timing they happen.
- This was all configured on ScriptableObjects in the unity inspector
- Different player models and enemy models have a series of markers placed on them for where different parts are, such as guns, head, legs etc. These can be used as sources or targets on the effects.
- One of the new requirements was to have a virtual MekaMon you could play as, matching the real MekaMon as closely as possible.
- To create this, I worked closely with the artists and animator at Reach to create the virtual version and have it move & look like the real one.
- Implementation of this required to create an interface between our robot code, and either the physical or virtual mekamon, and extensive refactoring of existing code.
- In order for the game to be fun & replayable, the AI needed to prevent a challenge that adapts to different play skill levels and difficulty.
- The AI had various actions in can perform, which each has it's own set of factors and unique logic for how they're combined to calculate the probability of performing them. Actions include:
- Approach target
- Flank target
- Attack target
- Flee from the target
- Find cover
- Factors used to weight these include
- Do we have a target?
- How far from the target are we?
- Do we have any weapons currently useable?
- How close to overheating are we?
- Is there any nearby cover? Can we hide behind it?
- Current difficulty
- and many more