Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Jan 2013
Offline Last Active May 23 2014 04:01 AM

Posts I've Made

In Topic: Dungeon generation method

22 January 2013 - 11:07 AM

Thanks for your input, Kylotan.

I've been trying out the options in this thread and so far it seems a combination of a (small) bsp-tree and what Kylotan described seems to give the best results. It will require some tweaking still but it's going in the proper direction, and I'm confident it will turn out the way I want it too.

Basically what happens now is that the grid is split at least two times, to make four different sized sections. This is to prevent long streaks of similar sized blocks in the next step.

Then randomly placed horizontal and vertical walls are added, and the resulting rooms are somewhat randomly merged.

This starts to look like the picture above, but there's still a bit of noise and jaggedness because my merging decision-making isn't optimal right now.

But I can work from here, thanks for help everyone!

In Topic: Dungeon generation method

22 January 2013 - 05:25 AM

Thanks for your insights! It indeed does look like it's a lot of smaller nodes joined together.
I'll give that a try right away.

I think I can use such a morphing function somewhere, but I'll have to play with it a bit first.

I have a free afternoon to try both tiling and the second-pass bsp, so hopefully I have some cool results in a few hours.

In Topic: Dungeon generation method

21 January 2013 - 08:14 PM

Thanks for your reply!
Randomness is very important, and I know some repetition is ok but I want to steer clear from it as much as possible. It tends to stand out in larger dungeons pretty soon.


It's especially the shape of the rooms that I want to be  more complex than just rectangles; predefining such rooms would lead to a lot of puzzling to get it all to fit, which would be slow. It doesn't have be done blazingly fast, but I do need to generate a lot of these sections to form a decent dungeon at some point, so it be great if it was.



I suppose some form of metatiling wouldn't be a bad idea though. I hadn't really considered that. Metatiles with some partial walls on them would be relatively easy to piece together and would form rooms automatically. I'll have to try it see it though.
And the dungeon is grid based, yes.

In Topic: Tile sheet spriting math ?

21 January 2013 - 04:55 PM

I recommend starting tile_num at 0, not 1!


Would be similar to this




//50 x 50 tiles
sprite_x_start = 32 * (tile_num % 50);
sprite_y_start = 32 * (tile_num / 50);



assuming sprite_y_start is an integer.