playMaker

Author Topic: How to structure game setup?  (Read 3463 times)

spacerobot

  • Playmaker Newbie
  • *
  • Posts: 17
How to structure game setup?
« on: March 29, 2014, 02:44:12 PM »
I am making an adventure game where there will be a lot of levels or rooms. There are some things like my camera, player, health manager etc. that will need to be there in each scene.

What's the best way to go about transitioning levels and keeping a bunch of default items active? Prefabs? Player prefs? Any other tricks?

I'm new to Unity and Playmaker so before I start building a bunch of levels I am trying to get a plan together to make it easier.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to structure game setup?
« Reply #1 on: March 31, 2014, 08:59:03 AM »
Hi,

 Typically, you want to use the "Don't destroy on level load" feature of unity ( action "DontDestroyOnLoad" in playmaker).

 this will make your object survive level loading.

 the downside of this is during development it becomes difficult to edit a particular level since you won't have the prefabs you have as you start the game for real.

 enters "Singleton", you can ensure with various technics that if an object exists already, then you destroy the duplicate. So for a given prefab that should be there at all time throughout your game, make it as a singleton, add it to all your levels and then during editing, you can play a particular level as is, and during the game, it will manage itself to maintain only one of this prefab at all time.

 http://hutonggames.com/playmakerforum/index.php?topic=6481.msg31681#msg31681

 search the forum for "singleton" and you'll get plenty of experience and technics.

bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: How to structure game setup?
« Reply #2 on: March 31, 2014, 12:16:59 PM »
Wow, there are so many hidden gems in these forums. There needs to be a curation system for most valuable posts.
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to structure game setup?
« Reply #3 on: March 31, 2014, 12:57:59 PM »
Hi,

 Yep, this forum is without a doubt an incredible source. I am working on a system that will leverage ( in time) the content of this forum, typically, all custom actions, templates, micro samples, will be accessible right into Unity :) I think I will release somethig this week, to start getting feedback and all.

bye,

 Jean

sebaslive

  • Hero Member
  • *****
  • Posts: 572
    • Frame Tale Studios
Re: How to structure game setup?
« Reply #4 on: March 31, 2014, 02:20:39 PM »
That would be incredible, thanks for the reply and update!
All my VR games use Steam VR Playmaker Toolkit: http://u3d.as/u20
And Oculus Touch Playmaker Toolkit: http://u3d.as/QT5


Follow me @sebasRez

Nitrohex

  • Junior Playmaker
  • **
  • Posts: 50
Re: How to structure game setup?
« Reply #5 on: March 31, 2014, 07:04:24 PM »
Hi,

 Yep, this forum is without a doubt an incredible source. I am working on a system that will leverage ( in time) the content of this forum, typically, all custom actions, templates, micro samples, will be accessible right into Unity :) I think I will release somethig this week, to start getting feedback and all.

bye,

 Jean

Great news, i can't wait to see this system in action.

Thanks Jean
Sign Up Now @ StartApp.com