Thibaut Platet
The ARmageddon logo (a floating island carrying a tower, trees, an explosion and a soldier) set between two captures of version 1.0 on a phone: on the left, the two armies deployed on either side of the front line, around a brick building; on the right, the battle, with an explosion among the blue soldiers by a lake.

At a glance

Dates
Context
augmented reality · solo project · ENSIM
Technologies
  • AR
  • Unity
  • C#
  • AR Foundation
  • Android

Overview

A miniature battle in augmented reality on an Android phone, built with Unity.

Problem

Make a miniature battlefield appear in the room, and be able to walk around it to watch it from every angle.

Role

Solo project: a prototype at ENSIM, then a version 1.0 as a personal project.

The idea

ARmageddon makes a miniature battlefield appear in the room you are in. The phone detects the floor: you set a terrain on it and sculpt it, it gets covered with trees, rocks and grass, then two armies fight on it, in a cartoon style.

The player walks around the scene and watches it from every angle. The starting idea: re-enact battles while seeing the whole battlefield, and show what augmented reality makes possible.

Trees, rocks, soldiers, buildings, bombs and water: asset packs imported into Unity. Explosions, smoke and sounds: generated by code.

New in version 1.0

The 2025 prototype set a terrain, soldiers and buildings, but soldier movement was only tested in a separate scene. Version 1.0 makes it a complete game:

  • The terrain is set where you aim, at the size you want, 1 to 3 m wide; before, it appeared on its own on the lowest detected surface.
  • The relief is sculpted point by point, with an adjustable brush, and dug areas turn into lakes; before, two fingers raised or lowered the whole relief at once.
  • Two armies face each other, on either side of a front line.
  • Soldiers walk on the sculpted relief, hear the enemy, take cover and shoot.
  • Buildings belong to a team, give cover and collapse under fire.
  • Each team has bombs, which dig craters in the terrain.
  • The interface is new: welcome screen, rules of the game, step-by-step buttons, Undo, Replay, pause when AR tracking is lost.
  • Sounds and short vibrations go with the actions.

The improvements announced for the prototype (several teams of soldiers, water, a bombing system) are done.

A game, step by step

Button names are given as they appear in the game, whose interface is in French.

  1. Place the terrain. An aiming frame follows the detected floor at the centre of the screen. Set the size, then tap Poser le terrain: the terrain is set where you aim, facing you.
  2. Sculpt. Tap the terrain to set a point, then hold Monter or Creuser, or drag with two fingers; the Zone slider sets the brush size. Dug areas fill with water.
  3. Deploy. Valider le terrain freezes the relief and draws the front line, the blue half facing you. Each team places up to 30 soldiers and 3 buildings on its side; Annuler removes the last one.
  4. Start the battle. Each soldier seeks the nearest enemy, closes in and shoots. Each team has 2 bombs: tap Bombe bleue or Bombe rouge, then the terrain, and the bomb falls.
  5. The result. A team wins when the other has no soldier and no building left standing. You can then replay the same battle, change the armies or start again on a new terrain.

Each step starts the video at the top of the page at the matching moment.

  1. The rules 0:00
  2. Place the terrain 0:04
  3. Sculpt the relief 0:08
  4. Deploy the armies 1:10
  5. The battle 1:56
  6. The result 2:31
Phone capture: a green terrain set on a tiled floor, with white points around which the relief rises; at the bottom, the Zone slider and the Creuser, Monter, Terminer and Valider le terrain buttons.
The relief, sculpted point by point.
Phone capture: the terrain covered with trees and rocks, a brick building, red soldiers on one side of the white line and blue soldiers on the other; at the bottom, the Soldats, Bâtiments, Équipe rouge and Lancer la bataille buttons.
The armies in place, on either side of the front line.
Phone capture during the battle: an orange explosion among the blue soldiers, by a lake; at the top, the soldiers and buildings left on each side; at the bottom, the Bombe bleue and Bombe rouge buttons.
An explosion among the blue soldiers.
Phone capture at the end of a game: the Les bleus gagnent panel, 12 soldiers standing and 2 buildings intact, with the Rejouer la même bataille, Nouvelles armées and Nouveau terrain buttons.
The end of a game.

An interface made for the thumb

The interface is built by code, with a few rules kept on every screen:

  • Everything fits within the screen’s safe area, clear of the notch and the navigation bar.
  • At the top, what you read: the instruction for the step and the messages. At the bottom, under the thumb, what you touch.
  • One main action per step, in orange, at the very bottom; the step’s tools just above it.
  • Buttons only appear at the step where they are needed: the relief, then the armies, then the battle.
  • At launch, a Comment jouer (how to play) screen sums up the goal of the game and its four steps.
  • When AR tracking is lost, the game pauses and says why: too dark, moving too fast, floor too plain.
Comment jouer (how to play) screen on a phone: the goal of the game, then the four steps (place the terrain, shape the relief, place the armies, start the battle) and the orange Compris button.
The Comment jouer (how to play) screen, at launch.

Under the hood

  • Terrain on a real surface. AR Foundation detects the planes of the room. For a miniature scene, the origin of the AR scene is scaled up, as AR Foundation recommends, rather than the content scaled down: the terrain keeps its game units (navigation, physics) and appears at the size you want.
  • Sculpting. The terrain mesh, almost flat at first, is deformed around the chosen point with a bell-shaped profile, softened by local smoothing. You can dig below floor level: these hollows turn into lakes.
  • Scenery. Trees, rocks, bushes and grass are placed with Perlin noise: a dense forest along the edges, so it does not hide the battle, groves inside, and 260 pieces at most for phone performance. Purely visual, the scenery has no collision.
  • Navigation. The NavMesh is baked on the sculpted relief when the terrain is validated, then rebuilt without a hitch after each crater. Water cannot be walked on, and soldiers walk around buildings.
  • Soldiers. A soldier hears an enemy beyond its firing range and walks towards it, with a slight random offset so the soldiers do not advance in single file. Within range, it fires once a second, with a 70% chance to hit. If the relief stops it, it fires from where it stands. With no enemy within earshot, it goes to destroy the enemy’s buildings.
  • Buildings. A soldier sheltering by a building is hit far less often: the bullets that would have hit it crash into the walls. Five stopped bullets bring the building down.
  • Bombs. Two per team. The blast wounds soldiers, less the further they are from its centre, damages buildings and digs a crater; two well-placed bombs bring a building down.
  • Victory. A team wins when the other has no soldier and no building left standing; if nobody can shoot any more, the team with the most buildings wins.
  • Effects and sound. Explosions, smoke, dust and sounds are generated by code, with no imported file, along with short vibrations.

The 2025 prototype

The first version, built alone in about fifteen hours at ENSIM, with Unity and C#, AR Foundation and ARCore: a terrain rising from the detected floor, a relief set with two fingers, a Lock button, and soldiers and buildings placed with a tap.

Soldier movement was tested in a separate scene, with Unity’s NavMesh: each soldier found the nearest one and went round obstacles to reach it.

In the Unity editor, a green terrain shaped like a slender peak, dotted with trees and rocks.
The procedural terrain in the Unity editor, with a very pronounced relief.
Phone capture: a green hill covered with trees in the middle of a living room, below the Soldats and Bâtiments buttons and above the Lock button.
The terrain in augmented reality, set on the floor of the room.
Three cartoon-style soldiers in front of a brick building topped with two water tanks, among trees and rocks.
Three soldiers and a building placed on the terrain.
A brick house with red and white striped awnings, a street lamp, fir trees and, on the right, a soldier.
Another building, seen up close.
Test scene in the Unity editor: two soldiers on either side of a wall, on a blue surface; red arrows trace their paths, which go around the wall and meet.
The test scene: the two soldiers go around the wall to meet.

Result

soldiers at most per team
30
buildings per team
3
bombs per team
2
the terrain’s side, in the room
1 to 3 m

A complete Android application, from placing the terrain to the victory screen. The version 1.0 APK is available on GitHub, for an Android phone that supports ARCore.