//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.

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.

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.

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.

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.


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.)






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.

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 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.

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.

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:
| Worm | Appears from | Length | Swallows within | Hears you from |
|---|---|---|---|---|
| Sandworm | 150 m out | 26 m | 2.6 m | 70 m |
| Great Worm | 450 m | 90 m | 6.5 m | 140 m |
| Leviathan | 900 m | 360 m | 18 m | 260 m |
| Colossus | 1.5 km | 600 m | 32 m | 400 m |
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.


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.


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.


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.

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.