Sign in

elementbound

@elementbound.bsky.social
27 followers 29 following 33 posts
PostsRepliesMedia
elementbound @elementbound.bsky.social · 22/09/2026
man i keep getting stalled because every time i open the project i just end up staring at the scene #gamedev #godot
082
elementbound @elementbound.bsky.social · 21/09/2026
you're now part of the party. time to conquer the cursed caverns!
static.klipy.com
God and Adam's Animated Handshake
ALT: God and Adam's Animated Handshake
000
elementbound @elementbound.bsky.social · 21/09/2026
you're in an unfinished dungeon and this guy walks up to you. what's your next move? 👀 #gamedev #godot
A cartoonish 3D character with dots for eyes and a simple line for mouth, dressed in a white shirt and shoulders, gray cloak and pants, and black leather boots. A golden sun symbol on his shirt, partially obscured by Z-fighting.
1132
elementbound @elementbound.bsky.social · 16/09/2026
hahah, indeed, I'll probably have more similar stories to come as I make progress really happy to hear you enjoyed the thread!
010
elementbound @elementbound.bsky.social · 12/09/2026
Cherry on top, the whole thing is based on a seed with PRNG. The same seed will yield the same map every time. Which means no need to stream the whole map with all its details over the network, just 8 bytes of seed. /🧵
000
elementbound @elementbound.bsky.social · 12/09/2026
While there's more to do, we now have a solution that is conceptually simple, runs under a second, avoids boring, long corridors, supports verticality, and produces interesting layouts with multiple choices. The next step is content and variety so you don't get lost in the grey.
screenshot of the generated map in first person, showing a tower in the background
100
elementbound @elementbound.bsky.social · 12/09/2026
With this setup, it's easy to create room variations, have treasure rooms, minibosses, puzzles, optional challenges, etc. Un/fortunately, the maps are only as interesting as the rooms they are made of.
emoji with a huge smile and a thumbs up
100
elementbound @elementbound.bsky.social · 12/09/2026
Let's talk about those rooms. The generator works with a Mapset, which contains a bunch of room templates. These have all the data on how and where they should be placed, where to put enemies, and where could players spawn. They bring their own navmesh, so we don't need to bake.
empty room showing entrances as green rectangles with arrows pointing outsideempty room showing enemy spawn points as demon iconsempty room showing player spawn points as helmet icons
100
elementbound @elementbound.bsky.social · 12/09/2026
Same budget-system for items. With the difference that only a few rooms get any budget. The budgets are sampled randomly from a curve, that favors mid results, with the occasional jackpot.
Godot editor showing configuration for bonus budgets - min budget, max budget, curve, empty chance
100
elementbound @elementbound.bsky.social · 12/09/2026
Still need to place enemies to fight. Each room gets a difficulty budget, which increases based on room depth - the further along you're on the map, the harder it gets. Enemies get picked randomly based on rarity, as long as they fit the budget.
Godot editor showing configuration values for enemy budget - base budget, max budget, deviation, empty chance
100
elementbound @elementbound.bsky.social · 12/09/2026
And since we now don't have to pathfind, we can freely do verticality. Could've been done before too, but probably much more compute intensive. Now we're just lining up doors, so if the room has an entrance both on top and bottom, the algo will try to fit a room on both.
100
elementbound @elementbound.bsky.social · 12/09/2026
This switch also meant that instead of starting with a graph and turning it into a physical layout, we generate the layout, and create the graph from that. Much simpler to turn a sensible layout into a graph, than to turn a graph into a layout.
100
elementbound @elementbound.bsky.social · 12/09/2026
NB that I've also switched from room count to depth as configuration. Instead of spawning 4 to 12 rooms, it now generates a map of depth 4. This eliminated backtracking, where you go through 4 rooms, and the only way forward is going back to spawn and taking a different turn.
100
elementbound @elementbound.bsky.social · 12/09/2026
This was the time for riding down the bell curve. How about we just place rooms randomly, and line up their exits? Much, much simpler, way faster, always succeeds, no boring tunnels. Line up room entrances, and make sure rooms don't overlap. We have achieved legos.
100
elementbound @elementbound.bsky.social · 12/09/2026
This is where things were getting *really* brittle. Since corridors can't overlap, the algo would often pathfind itself into an impossible situation. Ignore corridor overlaps, you'd get these long, winding corridors. Pulling rooms closer would mean the algo won't converge.
101
elementbound @elementbound.bsky.social · 12/09/2026
This would sometimes not converge - it would keep nudging rooms without finding a good layout. But appropriate settings guaranteed a sensible layout most of the time. To get from one room to the other, we'll place corridor tiles. Find the shortest path using breadth-first search.
100
elementbound @elementbound.bsky.social · 12/09/2026
Graphs tell you what rooms exist, but not *where*. My first attempt was placing rooms randomly in space and nudging them around until they make sense. Rules: - Push when overlapping - Push when too close - Pull when too far ( Footage greatly slowed down here )
100
elementbound @elementbound.bsky.social · 12/09/2026
Graph generation is simple and cheap here. Place a starting room, then fanning out until there's enough. At the end, make some random cross-links, i.e. links between rooms of the same depth. Depth here means how many rooms you have to visit starting from the entry room.
a graph of rooms scattered around, colored from green to red, based on their depth, i.e. distance from the starting room r0
100
elementbound @elementbound.bsky.social · 12/09/2026
I wanted to have a graph. It tells you what rooms exist, and their connections. This way the generator has an estimate on the order the players encounter rooms. This can allow placing "story beats" in order. E.g. putting a key in one room, and then locking the next room.
a graph of rooms scattered around
110
elementbound @elementbound.bsky.social · 12/09/2026
I use a few exported properties which are checked regularly, but you can also do setters. I've implemented everything as a coroutine that regularly takes a break, so I don't crash the editor or freeze the game. Also added a stop button - more useful than you'd hope!
@tool
extends Node
class_name MapGenerator

@export_group("Editor actions")
@export var _randomize := false
@export var _do_clear := false
@export var _do_run := false
@export var _do_stop := false
@export var _is_running := falsefunc _physics_process(_dt: float) -> void:
    if _do_clear and not _is_running:
        clear()
        _do_clear = false

    if _do_run and not _is_running:
        _do_run = false
        if _randomize:
            _seed = randi()

        clear()
        await get_tree().process_frame
        _is_running = true
        await generate(_seed)
        _is_running = false
        _do_stop = false
110
elementbound @elementbound.bsky.social · 12/09/2026
Before we get into it, there's a crucial step I want to share - fast iteration. Godot's @tool scripts are great for this, they let you run code in the editor itself. This lets you make a change, click, and see the results. Much faster than starting the game every time.
110
elementbound @elementbound.bsky.social · 12/09/2026
long time no post, let's do a writeup on procedural mapgen! 🧵 on how it went from a complicated mess to placing legos #godotengine #gamedev
bell curve going from "put room after room" through "heuristic based gradient desctent layout generation" back to "put room after room"screenshot of the Godot editor showing a procedurally generated dungeon
2225
elementbound @elementbound.bsky.social · 16/04/2025
oh look, it's me!
020
Reposted by elementbound
BatteryAcidDev @batteryaciddev.bsky.social · 21/03/2025
Want to add #P2P to your #Godot #multiplayer game? Check out my latest on #Noray ⭐️ youtu.be/YzWsmsrNCEU #gamedev #indiedev @elementbound.bsky.social @godotengine.org
053
elementbound @elementbound.bsky.social · 15/02/2025
this hypercore? docs.pears.com/building-blo...
docs.pears.com
Hypercore | Pears.com
000
elementbound @elementbound.bsky.social · 09/02/2025
what makes you feel this way? for me its UI system is decent so far, so I'm wondering what am I missing 😄
100
elementbound @elementbound.bsky.social · 08/02/2025
I know that feel, they usually take a few days 😄 For my own stuff I also post it as Github releases so people can always grab the latest version
100
elementbound @elementbound.bsky.social · 07/02/2025
nvm got it 😄 github.com/SWCreeperKin...
github.com
GitHub - SWCreeperKing/numberclass-gds: gdscript version of numberclass
gdscript version of numberclass. Contribute to SWCreeperKing/numberclass-gds development by creating an account on GitHub.
100
elementbound @elementbound.bsky.social · 07/02/2025
is this available on github too? wanted to check source on how you did it 😄
100
elementbound @elementbound.bsky.social · 07/02/2025
not the spicy thumbtack 😭 tbf I think the radioactive flavored RigidBody deserves a better spot
010
elementbound @elementbound.bsky.social · 29/01/2025
beat you to it by two 😄 basing my addon on autoloads is a decision that didn't age that well 😄
110
elementbound @elementbound.bsky.social · 28/01/2025
Thanks! Glad to be the bearer of good news 😄
010
elementbound @elementbound.bsky.social · 28/01/2025
In case you're looking for icons for your custom nodes - you've found it 😄 I've made a custom icon pack, specifically to work with Godot's UI conventions, licensed as CC0! github.com/foxssake/ple... foxssake.github.io/plenticons/ #godot #godotengine
1123
elementbound @elementbound.bsky.social · 27/01/2025
hey, someone recommended your post; I'm the author of netfox, a Godot addon for building multiplayer games, with lag compensation and other techniques out of the box. Like a higher-level multiplayer on top of Godot's. If you think it'd be a good fit, I'm happy to talk! github.com/foxssake/net...
github.com
GitHub - foxssake/netfox: Addons for building multiplayer games with Godot
Addons for building multiplayer games with Godot. Contribute to foxssake/netfox development by creating an account on GitHub.
130