A random level generator thing

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
FRII
Prole
Posts: 22
Joined: Tue Feb 23, 2016 9:45 pm

A random level generator thing

Post 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.
four years later and i hate remembering the posts i made on here exist but i can't delete any of them or my account
sorry you had to read this
User avatar
mr_happy
Citizen
Posts: 84
Joined: Fri Mar 18, 2016 8:57 pm

Re: A random level generator thing

Post 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)
FRII
Prole
Posts: 22
Joined: Tue Feb 23, 2016 9:45 pm

Re: A random level generator thing

Post 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.
four years later and i hate remembering the posts i made on here exist but i can't delete any of them or my account
sorry you had to read this
User avatar
Nuthen224
Citizen
Posts: 50
Joined: Sun Jul 28, 2013 9:40 pm

Re: A random level generator thing

Post by Nuthen224 »

Cool generator! It seems to make consistently good areas. What sort of algorithm does it use?
rgzk
Prole
Posts: 3
Joined: Sun Feb 07, 2016 3:24 pm

Re: A random level generator thing

Post 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 :)
User avatar
whitebear
Citizen
Posts: 86
Joined: Sun Mar 15, 2009 1:50 am

Re: A random level generator thing

Post by whitebear »

That generator algorithm is very strange but also efficient. I expected to find marching squares algorithm when I checked the code.
FRII
Prole
Posts: 22
Joined: Tue Feb 23, 2016 9:45 pm

Re: A random level generator thing

Post 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.
four years later and i hate remembering the posts i made on here exist but i can't delete any of them or my account
sorry you had to read this
Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests