playMaker

Author Topic: Sub-system creation?  (Read 1541 times)

MajorIdea

  • Full Member
  • ***
  • Posts: 131
Sub-system creation?
« on: December 10, 2013, 11:02:03 AM »
Hi all!

I was thinking about randomly generated 3d worlds and thought of a way to do it via sub-systems (not sure if that's the right term).

What I thought of was- imagine a grid of random float numbers all at a distance of 1 to one another. A square grid of floats generated at the start of the game. And each of these random numbers correspond to a numbered prefab - a piece of a level. These prefabs would be called into life when the player would be near the corresponding float.

Is it possible to use playmaker to generate this grid of floats?

I was thinking about having a set number of empty game objects with the float variable and move them to their respective positions (I can only think of doing it by hand... yikes), they would then be ready to listen to the player trigger and call the geometry corresponding to the random float number generated.

Is this possible? Or a really dumb way of doing it? Help?  ::)
« Last Edit: December 10, 2013, 11:04:26 AM by MajorIdea »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Sub-system creation?
« Reply #1 on: December 11, 2013, 02:09:27 PM »
Hi,

I would not create empty game objects actually, since your grid is of fixed size, you can compute one's position mathematically.

 you should study the endless jumper from m2h, ported to playmaker:

https://hutonggames.fogbugz.com/default.asp?W890

 because it's endless, the platforms are generated randomly on the fly, you could inspire from the fsm responsible for this random generation. But as I said, it's on the fly, when needed, doing a whole level generation on start might freez the computer ( regardless the use of playmaker or not)

https://hutonggames.fogbugz.com/default.asp?W893


bye,

 Jean