Page 1 of 1

A random level generator thing

Posted: Sat Mar 19, 2016 4:47 am
by FRII
I'm beginning work on a roguelike, and this is my level generator.
Wall tiles don't look quite right in windowed mode.

WASD = move.
R = generate new level.
F = toggle fullscreen.
T = toggle debug (doesn't do much).
ESC = quit.

Have fun.

Re: A random level generator thing

Posted: Sat Mar 19, 2016 7:39 am
by mr_happy
Looking good!

(feels more like the interface to an action game than a traditional roguelike but maybe that's what you're aiming for)

Re: A random level generator thing

Posted: Sat Mar 19, 2016 3:33 pm
by FRII
mr_happy wrote:Looking good!

(feels more like the interface to an action game than a traditional roguelike but maybe that's what you're aiming for)
I'm kinda basing it off Nuclear Throne, which isn't really a traditional roguelike, so it would make sense if it didn't feel like one.

Re: A random level generator thing

Posted: Mon Mar 21, 2016 1:05 am
by Nuthen224
Cool generator! It seems to make consistently good areas. What sort of algorithm does it use?

Re: A random level generator thing

Posted: Wed Mar 23, 2016 3:30 am
by rgzk
Wow that looks good!

I looked at the function where you generate the level because I was curious, I didn't expect it to be that short. Good job :)

Re: A random level generator thing

Posted: Wed Mar 23, 2016 3:13 pm
by whitebear
That generator algorithm is very strange but also efficient. I expected to find marching squares algorithm when I checked the code.

Re: A random level generator thing

Posted: Wed Mar 23, 2016 7:59 pm
by FRII
Nuthen224 wrote:Cool generator! It seems to make consistently good areas. What sort of algorithm does it use?
Basically it has some tables, one for floor x values and floor x values. It has a sort of "cursor" (might not be the best word but idk/c) and every loop it moves the cursor x either left 1, right 1, or stays. It does the same with the y. It also adds three more squares, (x + 1, y), (x, y + 1), and (x + 1, y + 1). Each (x,y) pair in these tables are a floor space. There's also a table for which image each tile uses.
rgzk wrote:Wow that looks good!

I looked at the function where you generate the level because I was curious, I didn't expect it to be that short. Good job :)
Thanks.
whitebear wrote:That generator algorithm is very strange but also efficient. I expected to find marching squares algorithm when I checked the code.
Oddity and efficiency often go hand in hand.