Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: PlatinumPlayer on July 18, 2012, 12:19:35 AM

Title: Random level generation, how?
Post by: PlatinumPlayer on July 18, 2012, 12:19:35 AM
I have a project where I want to randomly generate adventure zones, these zones will be like city blocks. If you have played fort zombie this is the exact sort of generation i am interested in. A grid-like zone that fills itself with building/street prefab's to create a unique adventure area every time the player enters. These buildings will have interiors, and not all will have the same footprint, some longer, wider, etc.

I am no programmer and have not studied procedural process's so have no idea of the workflow to build a playmaker script to achieve this. So my question here is to ask if anyone else has experimented with random level generation in playmaker, and if not, could anyone familiar with random level generation point me to some handy resources to start learning about it?
Title: Re: Random level generation, how?
Post by: jeanfabre on July 18, 2012, 02:45:09 AM
Hi,

 your first stop for this is to study the jump game from M2h that I ported in playmaker. it features a random generation of platforms. This is exactly the base you would likely use to generate your buildings. But instead of generating the same platform over and over, you would pick random buildings, etc etc.

https://hutonggames.fogbugz.com/default.asp?W880 (https://hutonggames.fogbugz.com/default.asp?W880)

and that is the fsm responsible for spawning platforms.
https://hutonggames.fogbugz.com/default.asp?W893 (https://hutonggames.fogbugz.com/default.asp?W893)

bye,

 Jean
Title: Re: Random level generation, how?
Post by: PlatinumPlayer on July 18, 2012, 06:21:42 AM
Thanks this will surly get me started, but one thing that worries me right away when i gave this more thought. How am i going to dynamically update/generate a navmesh at run-time. Far as i know the unity built in path-finding cant do that at run-time.

But maybe i'm just getting ahead of myself. I'll see what i can do with a random area generator, and worry about navmesh/ai pathing once i get it working.
Title: Re: Random level generation, how?
Post by: jeanfabre on July 18, 2012, 06:52:07 AM
Hi,

 No, navmesh are not dynamic unfortunatly.

bye,

 Jean