A random level generator thing

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

A random level generator thing

Post by FRII » Sat Mar 19, 2016 4:47 am

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.
Attachments
levelgendemo.love
(27.02 KiB) Downloaded 226 times

User avatar
mr_happy
Citizen
Posts: 83
Joined: Fri Mar 18, 2016 8:57 pm

Re: A random level generator thing

Post by mr_happy » Sat Mar 19, 2016 7:39 am

Looking good!

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

User avatar
FRII
Prole
Posts: 22
Joined: Tue Feb 23, 2016 9:45 pm

Re: A random level generator thing

Post by FRII » Sat Mar 19, 2016 3:33 pm

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.

User avatar
Nuthen224
Citizen
Posts: 50
Joined: Sun Jul 28, 2013 9:40 pm

Re: A random level generator thing

Post by Nuthen224 » Mon Mar 21, 2016 1:05 am

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 » Wed Mar 23, 2016 3:30 am

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 » Wed Mar 23, 2016 3:13 pm

That generator algorithm is very strange but also efficient. I expected to find marching squares algorithm when I checked the code.

User avatar
FRII
Prole
Posts: 22
Joined: Tue Feb 23, 2016 9:45 pm

Re: A random level generator thing

Post by FRII » Wed Mar 23, 2016 7:59 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests