r/roguelikes • • 6d ago

Procedural Map Generation

Recently started a blog about roguelikes and their mechanics. Just published my first real post about Map generation

https://www.catface.games/blog/basic-map-gen/

26 Upvotes

14 comments sorted by

4

u/questioning_helper9 6d ago

Nice! I've already got my first pass of generation working, but I actually like the look of your first algorithm for a more "warren" style of map, maybe a cave system with some roughening of the square edges.

2

u/WeeklySoft 6d ago

Cellular Automata is on the list of topics I want to talk about. That gives the feel.of caves.

And different methods can be combined!

1

u/questionable_nature 3d ago

I’ve come up with a fairly neat cave style map generator. Surprisingly simply and incredibly organic.  One benefit is that the entire map is guaranteed to be connected…

2

u/zzap129 1d ago

there is an interesting talk by Brian Walker how the maps in Brogue are created:

https://www.youtube.com/watch?v=Uo9-IcHhq_w

I think it is very well executed in Brogue. the Maps feel quite "natural" and varied.

Some floors have more doors and corridors,, others are open, others divided by chasms, later deptchs have smaller secret rooms etc.

3

u/sorrckl 3d ago

A blog that takes roguelike mechanics apart one at a time is something I'd happily follow. Which mechanic are you writing about after map gen?

2

u/WeeklySoft 3d ago

We're probably going to take a detour into pathfinding, because I actually use pathfinding in my map generation algorithm (an idea I stole from Brogue).

Any topic you'd like me to put some priority to?

2

u/IronAxeGames 6d ago

You should post that animation here in the description! Procedural generation animations like that always looks sick, I love seeing them.

1

u/WeeklySoft 6d ago

Probably not going to happen for this post. It's JavaScript generating maps, not a gif. But I love that idea, and it will probably happen in the future

2

u/IronAxeGames 6d ago

Ahh fair enough. We need more animations like that. I'm sure that r/proceduralgeneration would also love to see it.

1

u/WeeklySoft 6d ago

Thank you so much

2

u/thedyze 6d ago

https://screentogif.en.softonic.com/

Would have posted the gif myself, but not allowed in the comments in this subreddit.

2

u/AtlasOfDoors 5d ago

I think there's a small slip in the second snippet. It appends prevRoom instead of room, so the overlap check never sees the room you just placed and the next one can land right on top of it. Your map-gen.js pushes the new room, so the demo's fine, it's just the pseudocode.

1

u/WeeklySoft 5d ago

Thank you

1

u/OfficerFriend1y 6d ago

Let this man cook.

Seriously though, this is looking great. How long have you been at this game?

1

u/WeeklySoft 6d ago

The animation script was made explicitly for this post. I'm building up to what I hope is some interesting map generation that I use in my game, which I've been working on for a little over a year, off and on