Blog

//Designing a Procedural Roguelike in Unreal Engine 5

November 3, 2026

I’ve spent the last three weeks building a roguelike shooter in Unreal Engine 5, on top of Epic’s Lyra Starter Game. Here’s where it’s at: generated towns, an extraction loop, a pile of guns and monsters, and a desert full of worms that eventually get too big to run from.

A long colonnaded street of red and white columns leading to a domed rotunda under an amber sky
The main street of a generated acropolis.

It’s third person, every level is generated, and no two runs are the same. The newest piece is a vertical slice set out in the desert, with a jetpack, a worm about the size of a skyscraper and a quest that doesn’t use a single word. This post walks through the whole thing.

The short version: Unreal Engine 5.8 and Lyra, with all the gameplay in C++ across two plugins. Eleven generated tiers, close to thirty enemy types, 15 guns, 12 skills, 12 relics, and 82 automated tests, one of which plays the whole vertical slice by itself.

How a run works

You start in the sanctuary, a round platform floating in the void. There’s a portal for each tier, altars for permanent upgrades, an armory, a supply station and an achievements board. Pick a portal and you get dropped into an expedition, which is a level built fresh for that trip.

Enemies don’t spawn in waves. They sit in formations guarding parts of the map, so you get to decide which fights to take. Everything you kill or dig up gives you datapoints, but you only keep them if you reach an exit. Die on the way and they’re gone. Each level also hides three sigils. Find all three and the deep exit opens up, which unlocks the next tier and sends an escape horde after you on the way out. The next level generates behind a loading screen while you travel.

Looking down on a circular platform marked with glowing rings and spokes, a beam of light rising from its centre
The sanctuary, where you go between expeditions.

Every level is new, so you need some way of finding the exit. Press G (or up on the d-pad) and a breadcrumb trail lights up on the floor, a glowing line with chevrons that follows the navmesh to the nearest open exit. It gets relaid as you move, so it keeps up if you wander off. When nothing’s open yet it points to the closest exit anyway, sigils you’ve already spotted count as places to go, and down in a cellar it takes you back to the door up.

Third-person view of a character in red armour running down a narrow lane between white walls and red pillars, following a glowing line with chevrons on the floor
Following the breadcrumb trail down a lane in a tier 1 temple town.

The HUD is Lyra’s with my own pieces slotted into it. Along the top there’s a strip with the tier, what you’re carrying and what’s banked, sigils found, how many formations are still standing, and the trail key. There’s a shield gauge by the crosshair, and next to the ammo a panel with the gun’s level and your two skills with their keys and cooldowns. The glyph on the right edge belongs to the wordless quest I’ll get to further down. It points at the next step whenever that’s off screen.

Game screenshot with the HUD: a status strip along the top, a health bar at the bottom, and a loadout panel with two skills above the weapon slots at the bottom right
The HUD in the middle of a run.

The levels

This whole project actually started as a level blockout tool. I wrote a 3D Wave Function Collapse generator as an Unreal plugin. It fits rooms, corridors, ramps and roofs together one storey at a time, and the game grew on top of it. Each of the eleven tiers is a preset for that generator, going from catacombs and cathedrals all the way to a favela and a hive.

The first two tiers got extra attention. For tier 1 I wanted a temple town that looks like somebody planned it, so a site planner lays it out first: terraces around a keep, a moat, canals you can wade through, walled temple compounds, pagodas and gardens. Tier 2 is a classical acropolis with colonnaded streets, a forum, a big temple and a domed rotunda, built from a procedural kit of columns and statues. The blocks of houses inside both get filled in by Wave Function Collapse again, and the layout shifts with the seed, so you won’t see the same town twice.

Wide stone stairs climbing out of a moat to a red-pillared gate with curved roofs, under a night sky
The big stairs up out of the moat in a tier 1 temple town.
Aerial view of a generated acropolis: temples, a domed rotunda and blocks of houses on a raised plateau
A tier 2 acropolis from above.

The other nine tiers are the generator running one of its presets. Here are six of them from above. (The catacombs are underground and the hive has a lid on it, so from up there you’d just see sand and a purple shell.)

Slow aerial orbit over a dense whitewashed medina of alleys, domes and roof terraces around a walled courtyard
Tier 4, the medina. Twisting alleys, domes and roof terraces at all sorts of heights.
Slow aerial orbit over grey concrete blocks, stairs and walkways around a walled courtyard
Tier 6, the brutalist one: concrete slabs up on pillars, with walkways across the middle.
Slow aerial orbit over pinkish stone halls with skylit roofs around a walled courtyard
Tier 7, the cathedral, with tall vaulted halls and galleries inside.
Slow aerial orbit over a symmetrical arena of rooms and lanes with orange railings
Tier 8, the arena. It’s laid out like a multiplayer map, four mirrored quarters around a hall in the middle.
Slow aerial orbit over a maze of stacked rooms and ledges several storeys high
Tier 9, the favela: rooms stacked up to seven storeys, with scaffolding in between.
Slow aerial orbit over sandy broken ruins with domes and half-collapsed walls on a hill
Tier 11, the sunken ruins, which is as deep as you can go. Broken, half-roofless buildings spread over a hill.

Lighting and surfaces are generated too. Light fixtures go where they make sense for the kind of room they’re in, the materials are worked out in world space with no textures at all, and the atmosphere changes six times as you go deeper.

Some rooms have a door down to a cellar, which is my nod to Diablo. It’s a small maze under the level with a hoard at the far end and keepers standing around it. You fight your way down, grab the hoard and then have to climb back out and find an exit.

Werewolves and armed soldiers standing guard around a treasure in a dim cellar room
A cellar hoard, and the things guarding it.

Guns, skills and relics

I borrowed the loadout from Witchfire: two guns, a light skill, a heavy skill and two relics, all picked at the armory. There are 15 guns built on Lyra’s weapon frames, 12 skills and 12 relics. Everything levels up to 5, with a perk at level 3 and another at 5, and schematics you find out in the levels make unlocks cheaper. You’ve got a regenerating shield on top of your health, and it plays on mouse and keyboard or a gamepad (DualSense included).

Enemies

There are close to thirty kinds now. Lyra’s own soldiers (riflemen, breachers, wardens and scouts) share the levels with werewolf packs, zombie hordes and a few locals that only show up on certain tiers, like skeletons and corpse-raising warlocks in the catacombs, or crawlers and acid spitters in the hive. The werewolves take turns coming at you, so a pack doesn’t just dogpile you all at once.

Up above the streets, sphere drones patrol and dive into buildings after you, a rolling Sweeper heals them and lets out more, and every so often the Overseer, a huge drone, turns up as an event. The boss is the Sentinel, an armoured figure about a head taller than you. It’s retargeted live onto Lyra’s animations, so it moves and aims the way a player does and swaps between a shotgun and a rifle. It throws frag charges too, and overcharges when it’s hurt.

The Sentinel, an armoured humanoid boss holding a rifle, standing in an arched doorway
The Sentinel.
A black sphere drone with a glowing band hovering in a corridor, a beam of light running from it past the player
A Lancer drone up close.

The desert

Every level sits on an island, and every island is an oasis in a desert that just keeps going. There’s no wall at the edge, only a ward that keeps the island’s enemies in, and a few watchtowers you can climb to look out. Past that you get flatiron rocks and needles with dry washes winding between them. Further out are the deep sands, with dunes around 30 m tall and the half-buried ribs of something enormous. The terrain streams in around you on worker threads, in tiles that get coarser the further away they are, out to 14 km.

A generated walled town on an island, seen from above, surrounded by open desert and tall dark monoliths
An expedition’s island, sitting in the desert.

The further out you go, the more everything pays. By about 600 m it’s double, buried caches turn up more often, and worms start dropping schematics. It gets more dangerous at the same rate. Scarab swarms come up close to the island, and the worms hunt by sound. Walk or run across open sand and they’ll hear you. Stand on rock and they won’t. The game also keeps track of the furthest out you’ve been.

The player aiming a rifle at a swarm of large black scarabs on rippled sand
A scarab swarm near the island.

There are four kinds of worm at four depths, and each one gets bigger the further out you meet it, up to a bit more than double:

WormAppears fromLengthSwallows withinHears you from
Sandworm150 m out26 m2.6 m70 m
Great Worm450 m90 m6.5 m140 m
Leviathan900 m360 m18 m260 m
Colossus1.5 km600 m32 m400 m
Base sizes. Each kind grows the further it is from the oasis.

Too big for the camera

The two biggest worms broke the camera. Lyra’s third-person camera sits a few metres behind you, and when something 360 m long comes up right next to you, it ends up staring at a wall of worm or clipping straight through it. So the Leviathan and the Colossus now take the camera over for a few seconds, with letterbox bars, and hand it back when it’s over.

A Leviathan comes up from underneath you. As the sand starts churning, the camera pulls up and back until you’re a dot in the middle of a ring of boiling sand, and then the mouth comes up out of it straight at the lens. If you braced, it spits you out and the camera cuts to follow you through the air. If you didn’t, you get a wide shot of it towering over the spot where you were standing. And if you manage to get clear before it comes up, it bends its arc and comes down on you instead, which gets the same close-up as the Colossus below.

Looking down on the player braced in a glowing shield bubble, in the middle of a wide ring of boulders churning up out of the sand
The sand churning before a Leviathan comes up. That’s you in the bubble.
A Leviathan's open mouth rushing up at the camera out of the sand, a ring of teeth around a glowing throat, its petals spread around it
A second later.

The vertical slice: the Wordless Road

The slice came out of one design problem. With the smaller worms, the answer was always to run. So I made the last one too big to run from. Once the sand starts churning under you, the spot where the Colossus is going to come down follows you faster than you can move, and if it swallows you, you’re dead. That meant players needed something else to do, and the rest of the slice grew out of that.

A colossal sandworm rising like a tower out of the dunes at night, its jaws parting at the top, over a small player braced in a shield bubble
A Colossus works the other way round. It comes up a long way off, about 110 m tall, and the camera drops low behind you so you can see all of it.
Looking up past the braced player at the Colossus's open maw coming down, a ring of teeth around its glowing throat and its three petals spread
Then, as it comes down on you, the camera rushes in under the mouth and cuts away just before it lands.

The slice adds three new abilities. I wanted each one to cost you something and to tie into how the worms hear, so they change how you move around the desert:

  • Brace. Hold crouch and your shield turns into a bubble that takes half of every hit. While you hold it, it drains your shield and locks out your skills (a quick tap still just crouches). If a worm comes up under you while you’re braced, it spits you out instead of swallowing you.
  • The Updraft Harness. A jetpack, heavily inspired by Star Wars: Bounty Hunter, and it only works in the desert. You get about four and a half seconds of thrust plus a forward boost, up to 33 m high. Thrusting low over the sand is as loud as running, so the worms can hear it.
  • Homeward. Basically a town portal, and like the jetpack it only works out in the desert. Hold a key and a door rises out of the ground over six seconds, then takes you home with everything you’re carrying. Getting hit interrupts it, and you only get one per expedition, so you have to pick your moment.

You learn them through a quest that has no words in it at all. I took that idea from Moebius’s Arzach: no dialogue, no quest log, no objective text. About 300 m out there’s a fallen rider, and digging it up gets you the harness. Three stones sit on top of 24 m spires that only the harness can reach. Wake them up and their beams point to where a bell rises out of the sand. Ring the bell and the Sleeper comes for you, which is a Colossus. If you brace, it spits you onto a 60 m monolith that’s too tall to jetpack up. On top there’s a door standing on its own, and walking through it teaches you Homeward and takes you home. So the thing you’ve been running from the whole time ends up being your way up.

Beams of light from distant spires meeting over the desert at night, with a tall monolith on the horizon
The stones’ beams meeting where the bell comes up, with the monolith behind.
The player crouched inside a translucent shield bubble on rippled sand, with giant ribs and spires behind
Bracing.

The only text in the slice is the control hint when you pick up a new ability. Everything else is glyphs. A strip of them along the top of the screen stands in for a quest log, and the glyph for your next goal floats over wherever it is in the world.

Some technical bits

  • The generator and the run logic live in one plugin that doesn’t know Lyra exists and has its own tests. A second plugin hooks it all into Lyra’s characters, weapons, Gameplay Ability System and HUD.
  • Enemies, worms, weapons, skills and relics are all specs in tables. One asset, the art set, lists every placeholder mesh, material, sound and music slot, so swapping in real art later is a matter of changing entries.
  • The worms only know about one thing: noise. Footsteps, jet thrust, landings, digging and the Homeward door are all just sounds to them, which is why the jetpack and Homeward worked with the worms straight away without any new AI.
  • Collision cooks in the background while the loading screen keeps moving, and an editor-only copy of the level mesh gets skipped in play. That took the slowest tier’s load from about 53 seconds down to 21.

Tests

I lean on automated tests a lot. There are 82 of them: 54 for the generator and run logic, and 28 that run inside Lyra. They check that every tier generates levels you can actually walk through, that a full run plays out, and that the weapons, drones, bosses, desert creatures and controls all work. A packaged build can run a smoke test of the whole game on its own, and none of the tests ever touch the real save file.

The vertical slice has a test that plays it the way a player would. On a fixed seed and a fresh save it digs up the harness, flies to each spire, rings the bell, braces through the Sleeper, rides the spit and walks through the door, checking the game’s state at every step. Most of the desert screenshots in this post came out of tests like that. The worm cameras have their own tests too, which fail if the camera ever ends up under the sand or inside a worm.

A grid of sixteen screenshots from the automated playthrough of the vertical slice
Sixteen frames from the automated playthrough of the slice.

That playthrough test found bugs I’d otherwise have hit much later. The 12 m dunes were burying the quest markers, the worm’s own body was stopping the spit in mid-air, and the brace bubble vanished a moment after it appeared because a shared effect destroyed itself once it finished growing.

What’s next

Most of the art is still placeholder, and the slice’s numbers are a first pass that need proper playtesting. Next up are tuning, a skill tree, real art through the art set, a soundtrack, and a packaged build people can play.

How I built it

Unreal Engine 5.8 and Lyra, with Claude Code as my coding partner for the C++, the tests and the capture scripts. I set the direction and made the design calls, from the references for each tier and the extraction loop down to the slice’s rules: hold to brace, a Colossus kills you if it swallows you unbraced, one Homeward per expedition, and no words in the quest.

If you’re hiring for game design or technical design and want to talk about any of this, I’d be happy to chat.