The arena
For creatorsAdd-on 2.2.2+
In this tutorial you build a first-person arena: a central platform, catwalks you can walk under and climb, crates for cover, and glowing trims under fog. Bots come in waves and hunt you. One scene setting makes the game first person; everything else is components you already know how to set. This builds on tutorial 13, Tracks from real streets.
▶ Play the arena: click to lock the mouse, W A S D move, the mouse looks, a click (or F) fires, Space jumps, Shift runs, R plays again. On a phone, the left thumb moves (push to the rim to run), the right thumb looks, ✶ fires (hold to keep firing) and ⤒ jumps.
1. Make the scene first person
Section titled “1. Make the scene first person”-
Save a new file as
arena.blend. -
In Properties ▸ World ▸ Simulacrum ▸ Player, set Player to First Person: it writes
player.controller=fps. Add the weapon’s settings from the table below in Properties ▸ Scene ▸ Custom Properties. -
In World ▸ Simulacrum ▸ Input, press Add Action and choose the preset Walk set (WASD + Space + Shift). It adds
moveX,moveZ,jumpandrun, the actions the first-person player reads. -
Press Add Action again and choose Fire (F / left mouse):
fire=keys:KeyF ; mouse:left. Addagain=keys:KeyR/Enterfor the restart. -
Drag a Spawn Point from the Simulacrum asset library to where the player starts, and name it
Spawn.
With player.controller = fps you get mouse look (click the page to lock the pointer), a character controller with gravity, jumping, steps, ramps and sliding along walls, health, a weapon, and your body: the player wears a wardrobe body whose legs walk and run with the controller’s real speed. It stands a little behind your eye, so you see your body and its shadow but never your own head.
| Tag | Default | What it does |
|---|---|---|
player.controller |
fps plays the scene in first person |
|
player.body |
male-hoodie |
The wardrobe body you wear, or none |
player.spawn |
Spawn |
The object you start at |
player.health |
100 |
Your most health |
player.walk · player.run |
5.2 · 8 |
Walk and run speeds, m/s |
player.jump · player.gravity |
5.6 · -16 |
Jump speed (m/s) and gravity (m/s²) |
player.radius · player.eye |
0.35 · 1.6 |
Your width and eye height, metres |
player.sens · player.touchSens |
0.12 · 0.3 |
Mouse look and phone look, degrees per pixel |
weapon.damage |
25 (the arena: 20) |
Damage per hit |
weapon.rate |
6 (the arena: 7) |
Shots per second; held fire repeats |
weapon.range · weapon.spread |
80 · 0.8 (the arena: 90 · 0.6) |
Range in metres, spread in degrees |
weapon.ammo |
60 (the arena: 120) |
Starting ammo; -1 is endless |
On a phone the left half of the screen is a floating joystick that feeds moveX and moveZ; push it to the rim to run. A drag on the right half looks. Fire and jump are the scene’s own pad: add a HUD Choice Menu (Add Component ▸ HUD & Menus ▸ HUD Choice Menu) with hud.menu = fire=✶|jump=⤒, hud.layout = pad, hud.at = right (a column of round buttons at the bottom right) and hud.touch = 1 (touch screens only).
2. Build the level from blocks and ramps
Section titled “2. Build the level from blocks and ramps”-
Model the floor, outer walls, pillars, the central platform, two catwalks and some crates as boxes. Give each one Add Component ▸ Shooter & Strategy ▸ Level Block. A block is measured from its real bounds.
-
Model the ramps as wedges and give each Add Component ▸ Shooter & Strategy ▸ Level Ramp. Set
fps.rampto the side it rises toward:z+,z-,x+orx-. -
For a surface you walk on that never blocks, use Add Component ▸ Shooter & Strategy ▸ Walkable Surface (
fps.floor = 1).
A Level Block stops you whenever it rises above a step (0.55 m) and starts below your eyes. You can walk on its top, and it blocks a bot’s line of sight. So a waist-high crate is cover, a kerb is a step, and a catwalk whose underside is 2.6 m up is a roof you walk beneath.
3. Put a rifle in your hands
Section titled “3. Put a rifle in your hands”-
Model the rifle pointing along Blender’s +Y axis (away from you in the front view), and give it Add Component ▸ Items ▸ Viewmodel.
-
Set
viewmodel.offsetto where it sits in the camera’s frame (the arena uses0.2,-0.21,-0.68). It rides the camera with a walk bob and recoil.
The rifle hits instantly along the centre of the screen. Each shot has a muzzle flash, a tracer and sparks, and the crosshair marks hits and kills. Being hit flashes the screen edges red. On a phone held upright, the gun is drawn closer so it stays in frame.
4. Add health, bots and pickups
Section titled “4. Add health, bots and pickups”Add them from Add Component: Health and Bot under Characters & People, Pickup under Items.
| Component | Tags | What it does |
|---|---|---|
| Health | health = most health |
Makes any object shootable. At 0 it is destroyed (if it was spawned) or hidden, and the world hears world:killed |
| Bot | bot = 1, bot.speed, bot.range, bot.sight, bot.rate, bot.damage, bot.accuracy, bot.eye, bot.body |
A hunter. Needs Health too |
| Pickup | pickup = health or ammo, pickup.amount, pickup.respawn |
Walk over it and you take it if it is useful. It returns after pickup.respawn seconds |
A bot wears a wardrobe body (bot.body, or one picked for it), turns to face you, and walks or runs as it moves. It closes to bot.range, checks its line of sight against the blocks, strafes and fires: bot.accuracy is its chance to hit at 10 m, lower farther away and when you move. It cannot see through a pillar. When it is blind and blocked, it steps sideways for a while.
-
Build the bot as a spawnable,
arena-bot.blend: one Empty with Health (health = 60) and Bot (bot.range = 10,bot.rate = 1,bot.damage = 7,bot.accuracy = 0.5,bot.speed = 3.4,bot.sight = 45), taggedasset.primary = 1. It is dressed in a body when it appears. Press Build Cartridge. -
In the arena, set
spawn.preloadto the bot’s address. -
Place health kits and ammo boxes with Pickup: the arena’s kits give 35 and return after 15 s.
5. Write the rules
Section titled “5. Write the rules”-
Waves come from data. Add
data/waves.json(bots per wave: 2, 3, 4, 5, 6; the last row repeats) anddata/spawns.json(the points they appear at, asx,y,z). One For Loop spawns the bots for the wave. -
A kill. On
world:killed, add 1 tokillsand 100 ×wavetoscore. When the last bot of a wave dies, start the next wave after a 2 s breath. -
Death. On
world:player.dead, end the game and keep the best score. Play again clears the bots, callsrespawnon the player and restarts the waves. -
The HUD. Ten times a second, ask the player for its
healthandammoand showHealth {hp} · Ammo {ammo} · Wave {wave} · Kills {kills} · Score {score} · Best {best}.
The player answers to the name Player with Call Component: damage, heal, health, ammo, addAmmo, dead, respawn, position and kills. The world also hears world:player.dead, world:player.hit and world:pickup.
6. Give it the console look
Section titled “6. Give it the console look”Give materials roughness, metal and emission in Blender: concrete, brushed metal and glowing trims. Then turn on the scene’s look settings (Look and light): ambient occlusion, bloom, ACES tone mapping, a sunset environment, a shadow-casting key light and fog. The arena uses look.bloom = 0.03 and look.fog = #1b212b,0.012.
7. Build and play
Section titled “7. Build and play”-
Press Build Cartridge, then publish the arena and its bot (Publish and share).
-
Open it and click to lock the mouse: two bots come for you. Duck behind a pillar and they lose sight of you; step out and they fire.
Limits
Section titled “Limits”Bots do not find paths round obstacles yet. When one cannot see you and is blocked, it only steps sideways for a while.
What you learned
Section titled “What you learned”player.controller = fpsgives mouse look, a character controller, a weapon and a body you can see.- Level Block, Level Ramp and Walkable Surface build a level from Blender shapes.
- Viewmodel, Health, Bot and Pickup make a shooter from tags; waves come from a data table.
Next: the strategy tutorials start with RTS units and orders.