Goblinz Proto — devlog: dungeons, loot, and the first goblin that can actually chase you
- Unity
- Multiplayer
- Procedural Generation
- Prototype
Small update on the prototype. In the video below: two players in one session, a procedural dungeon, an inventory with loot, and an enemy that notices the player and gives chase.
Two players, one procedurally generated dungeon, loot changing hands, and a goblin giving chase.
Side note: alongside the game itself, I'm building out a shared core package — AshTrickz.Friendslop — meant to be reused across future games in this style, not just this one. Anything below that isn't specific to goblins or dungeons (networking base, inventory, character controller) lives there, not in the game-specific project.
Networking
Under the hood it's FishNet, server-authoritative. The server decides what happened, clients just reflect it. No client-side improvising on positions or loot — picking something up, dropping it, stashing it, all of it goes through the server; the client only requests and displays the result.
Dungeon generator
This has been the bulk of the work over the past few weeks. The idea is DunGen-style: rooms and corridors are regular prefabs with doorway markers, assembled at runtime by snapping doors together.
The key architectural call: decide the dungeon's shape first, as an abstract graph — a guaranteed path from start to end plus a few branches — and only then turn that graph into actual rooms. Earlier it worked the other way: the generator greedily tried to attach a room to the first open doorway it found and just saw what stuck. It worked, but the result was hard to control, and every attempt was expensive — checking whether a room fit meant actually spawning it in the scene, then destroying it if it didn't.
Now placement is pure math with zero objects created along the way — the planner works out positions and rotations on paper, and only once a full plan is accepted does the scene get built in a single pass. Rooms never touch each other directly, only through a corridor, and if a room doesn't fit off one corridor, another is tried from the same doorway (up to a few in a row) before the search gives up.
I also made sure the very first corridor past the start room produces a real fork instead of one straight corridor — for a test prototype that alone makes it about twice as interesting to explore.
Generation is deterministic: the server rolls one seed, and every client — including the host — builds an identical dungeon locally, with no room geometry sent over the network at all.
Inventory and loot
Three hotbar slots, look-and-interact pickup, and you can drop what you're carrying. Heavier items don't fit in your pocket at all, so you're constantly deciding whether to haul it now or come back for it later.
The starting room doubles as the stash — the goblins literally dump their haul back where they broke in. There's a trigger zone inside it: drop an item in there and it counts toward the crew's shared total and just stays there in the world, nothing despawns.
NPC chase
First enemy that actually reacts to the player: spots you, breaks into a chase, and paths using a NavMesh that gets baked after the dungeon is generated — every run has a different layout of doors and rooms, so the walkable surface has to be built from whatever geometry actually got placed, not baked ahead of time.
What's next
Real room geometry is next (right now it's boxy placeholder rooms that only started lighting correctly a few fixes ago), plus a bigger pool of room variants — right now the preset has barely a handful to pick from.