Designing a Randomly Generating World

9pastaguy

Villager
Member
Joined
Oct 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
I've been trying to design a Randomly Generating World for a game I am designing but it uses way to many variables and I can't find a way to change the ground tiles other than tile swap scripts.

Does anyone have any ideas?
 

orochii

Abomination of life, or life itself.
Veteran
Joined
Apr 29, 2012
Messages
657
Reaction score
382
First Language
Spanish
Thing is that, for randomly generating a world (maps), you need to script it. You need something that procedurally generates the environment based on a seed or something. Generating a world can be as complicated as you want too (starting from complicated -just some empty roads- to really complicated -smooth terrains filled with forests and other massive things-). And that's not all, right? Probably you're striving for more content to be randomly generated.

Also there is the balancing part, making things always work (if not, your players will need to start like 30 games to play just once). One example of this is Binding of Isaac, which still haves hard runs based on luck.

But anyway, one thing you can try to do to evade the procedural environment generation thing and not need to script anything, is making some maps with a specific amount of exits. So when the game starts, all you save is where a map teleports you to. Example:



Let's say we have this set of maps. Every of them are forest maps. So at the start of the game (or the area), we throw 13 random numbers and save each of them on variables. Let's start with top-exits. We have three maps with top exits, and three more with bottom exits. So if your number says 0 for example, you save a specific map id on that variable (let's say 1, the first map on our example with a bottom exit). You save 4 if the variable equals 1 and 6 if it is 2. Of course, if, for example, the 3rd variable throws a 2, you reroll it, because if not, the map will loop vertically. You can also control what maps have you used already, and make a loop check it and reroll the value accordingly.

After all that ruckus, all you need is to make each of the exits to teleport you to a place based on variables. For X, you can use the player's X on vertical exits, and use a set number for Y (0 or 12), and the opposite for horizontal exits (X=0 or 16, Y=player's Y).

Anyway, as you can see it is pretty complicated, but it's doable by eventing.

There is also the use of floors, which simplifies things. You make, for example, a dungeon game, make several floors, and make variations for each floor. Then just throw a random number from X to Y, and teleport to the map. Or in this case, you can also use a random dungeon generation script (I think I've seen some, but I don't know if any of those are for VXA).

===

Now, for the mechanics part, gameplay impact and all that. There is one thing you have to consider, and that is the replay value. Making random generation means that you strive for making a game different from other. Again, I pick Binding of Isaac as an example here, where it doesn't even needs to create maps from the ground, but instead uses a set of templates and assembles them in different ways to create a dungeon floor (what I were trying to assimilate in the previous part of this post).

There is also the random generation factor from Minecraft. Imagine Minecraft without a randomly generated world. Not much difference on the landscape maybe, but the diamonds location and all that stuff would not be that surprising. You could know that on position 300,300, you dig 20 blocks and you find the necessary iron to make whatever else, and stuff.

Lastly, random item generation. What is the intention behind it? Think about Diablo. Doesn't it feels like there are an infinite amount of equipment pieces? Yes, that's random generation creating (almost) unlimited content for you.

So what do you think? Are you prepared for the random generation god?

Orochii Zouveleki
 

Imemperor

Animaniac
Member
Joined
Oct 26, 2013
Messages
19
Reaction score
7
First Language
English
Primarily Uses
Wasn't that the basis of Challenge 4 on the blog? I don't think Nick ever made a post on the best answer of that.
 

Darkanine

...In my thoughts and in my dreams...
Veteran
Joined
Sep 9, 2012
Messages
354
Reaction score
218
First Language
English
Primarily Uses
RMMV
Pretty much what Muramasa said,if you ever played dead Fatal Labyrinth on the sega genesis,you'll know how a bad generated world can be (there was a high chance for the game to make important areas and doors inaccessible due to random walls.Personally I think a random generated world can't really work in standard RPGs,so I would go with a Binding of isaac/Risk of rain style would be fine.
 

9pastaguy

Villager
Member
Joined
Oct 27, 2013
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Thank you! You've all been very helpful!
 

Latest Threads

Latest Posts

Latest Profile Posts

Is there a way to add pictures to profile posts?
I just graduated from high school yesterday!
I accidently wipe out my entire hdd...
Hey everyone, I'm going to do winners announcement post for the OCCIII after we get the edit bar fixed. It's kind of hard to do any announcement without formatting! Thanks for the patience.
3am me: So how do you feel about a character inviting their own character portrait to a tea party? =D

3pm me: //facepalms

Forum statistics

Threads
107,647
Messages
1,031,144
Members
139,773
Latest member
Archon126
Top