How do I Create a wall around a randomly generated room?

Get help using Construct 2

Post » Mon Jan 18, 2016 5:13 am

Hello forum!
I am using this tutorial to experiment with random (procedural) generation http://www.vlambeer.com/2013/04/02/random-level-generation-in-wasteland-kings/

I have got as far as you can see in the gif. the brown areas are ground, the grey are "wall".

my only issue is how to keep the player from moving past the edges of room they are currently in. I am attempting to add a wall object that will box the player in, but I do not know how to add the wall at the edge of the room.

Thanks!

Image
http://imgur.com/bGtISRm
B
7
S
1
Posts: 3
Reputation: 850

Post » Mon Jan 18, 2016 11:51 pm

Hmm...
Are you using arrays to do this or is it just laying down sprites?

If you're using an array to do this then you could loop over the array and create a wall where the floor isn't. Actually a tilemap would be better and done in the same way.

If those are just sprites, then it may take a different approach. It's an interesting enough idea that I had a go at it:
https://dl.dropboxusercontent.com/u/542 ... _edge.capx
B
91
S
31
G
99
Posts: 5,192
Reputation: 65,670


Return to How do I....?

Who is online

Users browsing this forum: HellMax, vGoliath and 1 guest