Top Down Level Generation

Get help using Construct 2

Post » Sun Sep 15, 2013 9:33 pm

Hi! I want to make a Binding Of Isaac style game, basically a zelda style roguelike. I've been struggling with randomly generating a world though, I know there are 2 major ways to tackle this:
1) Not actually generating a room but picking a random preset layout for each room
2) Completely randomize the generation through algorithms, arrays and such

I'd be happy to take either approach, the issue gets more complicated when rooms have to be persistent, a player must be able to leave a room, re-enter and be in the same room. This is where my troubles start, but other issues include putting doors in the correct places and ensuring the amount of rooms is kept manageable

Sorry if my post seems rather nonsensical but I have assumed a basic knowledge of The Binding Of Isaac (which everyone should play by the way)
Here's some footage if you've never heard of it
LevelUpJordan2013-09-15 21:36:12
B
23
S
4
G
1
Posts: 71
Reputation: 8,346

Post » Mon Sep 16, 2013 6:25 am

Check this out:
https://www.scirra.com/tutorials/360/generating-a-random-tile-map

will show you a fast way to draw a matrix, and poke random values into a Array.

These can later be loaded and saved from disk, Ajax, or the node webkit plugin.

Easy way is to use web storage.,.. Node webkit is a little more complex.

There is a Load and save system too, so each room could be a layout that you generate, and save on exiting, and loads on entering. It should keep everything the same, like the music playing and some off the other objects.

https://www.scirra.com/tutorials/526/how-to-make-savegames

That is the new save/loiad system ^^jojoe2013-09-16 06:26:38
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Mon Sep 16, 2013 6:37 am

[QUOTE=LevelUpJordan]
I'd be happy to take either approach, the issue gets more complicated when rooms have to be persistent, a player must be able to leave a room, re-enter and be in the same room. This is where my troubles start, but other issues include putting doors in the correct places and ensuring the amount of rooms is kept manageable
[/URL][/QUOTE]

For the doors, leave a breadcrumb with the X and Y value of the door you exit using the webStorage plugin. Then you can have code that generates unvisited rooms, and looks in the webstorage for the Key "DoorsXandY", and spawns an exit door in the new room in the appropriate place,
B
29
S
8
G
4
Posts: 767
Reputation: 5,985


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], leandrogenske, R0J0hound, TylerJS and 10 guests