# Random room generation

I have been trying to create a spelunky clone like level generator.

Can somebody give me a blueprint that will generate levels like this?

I think there are several options in the unreal marketplace
Have you checked it?

I share a lot of my knowledge for free in these forums, I donâ€™t know why people canâ€™t ask for something free before looking at other options, without being harassed.

Ok here is a more in-depth explanation:

There are 5 rooms, Each has a location in an array

The game starts with a random integer that is gonna determine where the StartingRoom is spawned

Letâ€™s Call this integer A (0-4)

This is the starting room, Letâ€™s say this has an orange color

Then another random integer is rolled, Letâ€™s call this integer B (0-4)

that is gonna determine where the UpRoom is spawned

This is the UpRoom, This is the room that has to have an opening at the top

Every room between the Up room and starting room is a corridor room, They have to have openings at both the left and the right so the player does not have to use any bombs to create a way

all the other rooms become optional rooms, these rooms can have openings, but can also be closed

Then when everything is done move all the actors where the location is saved in the integer up 1000 and repeat, But instead of a starting room a DownRoom is spawned above the UpRoom, This room has to have an opening at the bottom

Then integer B is reRolled to determine where the next Up room is gonna be, Fill in the rooms in between the DownRoom and the UpRoom with corridor rooms

When that is done all the rooms left become bedrooms

Repeat this until the last layer where instead of an UpRoom a finish room is spawnedÂ¨

So

If A = 1 and B = 3

Room 1 become a starting room and B become an uproom

2 become a corridor room and 0 and 4 become optionalrooms

If A = 4 and B = 1

Room 4 become a starting room and 1 become an Uproom

3 and 2 become corridor rooms and 0 become an optional room

If A = B then a special room is spawned that is both an UpRoom and startingRoom at the same time, The rest become optional rooms

Dang bro thatâ€™s deep

Iâ€™ve been trying to learn unreal for 5 weeks now, been doing pretty well in fact (besides procedural generation itâ€™s not working with me) but you have now got me motivated to help people
Thatâ€™s cash money homie

2 Likes

Hahaha

Never expected that someone will use my comment anywhere XD

@DomusLudus - nobodyâ€™s being harassed here :o

If he wants something for free - look the internet through for examples, codes, ready BPâ€™s, whatever
Coming to a forum, placing the first thread ever and â€śgimme bp that makes roomsâ€ť, if he gets it the same day another post â€śgimme working characterâ€ť, another day â€śgimme enemies and bossesâ€ť and so onâ€¦

There are plenty of places where you can find this useful stuff called information and googling stuff doesnâ€™t harm you

Also sometimes buying some good stuff is a good idea to support creators
here some cheaper one which is also amazing!

@abugust - Remember that 3D technique will also apply to your 2D game as it also exists in a 3D space anyway

Regarding the post again:
In my eyes itâ€™s just spam, you may see it other way but try asking random people on street for clothes, cars, houses, coffee beans, nivea shampoo or whateverâ€™s not a cigarette or food if they will give it away to a stranger

If they know you - itâ€™s easier, as a stranger - at least put some effort into it to convince people ;]

Even some nice posts are being skipped and not visited so much therefore if your post looks good - it makes the people happy and soft to at least point you in the right way. Well, later he updated the post and the comment looks AMAZING now! ( I kindly advice you to put that text as post description )

@AntiGravity #Point 1 - I totally agree with that!

We donâ€™t mind to help people look for stuff, sometimes our Google does better :P, we also donâ€™t mind advicing or sharing our stuff but like just said - it looks like he didnâ€™t even put any effort into searching, maybe he did but the original post looks like waiting for others to do your stuff done and thatâ€™s itâ€¦

And I like that you @DomusLudus offer help as well, thatâ€™s always good, we do as well but we also wanna have the Forum organized in some ways, for us no effort from poster - no effort from our side (at least regarding requests, cuz we put much effort into writing the comments XD) and once again - Nobodyâ€™s being harrassed here!

And the update on his post looks so well that I even started googling! XD
He showed he knows already something about the Engine, knowing that I know now that I can advice him with this, this or this and this one even has an example project so you can play around! Oh, check this one out as it also contains a project!

I know, they all donâ€™t look like in Spelunky
Check out this video - it explains exactly how such levels are generated and instead of Noise pictures - you can work with numbers to generate different things ;]

Itâ€™s not as difficult, you just need some strict rules, as an example - you know the map XY size, from that you can apply math to create some long floors that will never reach X max size to create a hole, add some blocks above and below to create differences and so on, itâ€™s not something to explain in raw text but itâ€™s a tip from my side that with math and some rules (booleans and math again) youâ€™ll be able to create simple map, more complex just needs consideration of more rules

Also a lil teaser of my room generator based on some settings

// Sorry for 5 edits - made some spelling changes XD and added some more text

1 Like