playMaker

Author Topic: Working with Scenes  (Read 5716 times)

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Working with Scenes
« on: October 19, 2011, 02:44:25 PM »
Does anyone want to take a few minutes to explain to me how to work with multiple Scenes?

I currently only have one Scene in my project.. But i think i will make a new simple Starting scene that will have a language menu and a small intro movie..

So i assume i just literally make a new scene and start building and then load the main one when i am done...

Now when i am previewing my project if i want to start with my introduction scene then i run that scene and if i get that the way i want it then i just switch back to my main scene and it will run from its beginning correct?

Sorry if these are dumb questions but i have never looked at this and hope to put something together pretty quickly so if anyone has some little words of wisdom that might save me some work that would be awesome!!

Q

Andrew.Lukasik

  • Full Member
  • ***
  • Posts: 134
    • my twitter @andrewlukasik
Re: Working with Scenes
« Reply #1 on: October 19, 2011, 04:50:01 PM »
Making everything on separate scenes can make a lot of things easier and cleaner. But it is technically possible to do everything on one single scene. So the question is - what type of overall architectural directions suits specific development needs of your current project.

When it comes to menus if you're advanced user of PM then you can think about making it as a prefab - so you could just spawn it in game (with its own camera and in different position in space) just when needed. But a simplest and fastest way to do it is of course to load another "menu" scene.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Working with Scenes
« Reply #2 on: October 20, 2011, 01:03:09 AM »
Hi,

 a very important point not to forget is that you can combine multiple scene together, it doesn't have to be one scene and then another, you can merge them as you see fit.

 Bye,

 Jean

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Working with Scenes
« Reply #3 on: October 20, 2011, 10:57:35 AM »
Thanks Andrew.. another reason for splitting up my scenes is to have a quick loading scene first.. i think that makes sense.

Jean.. Not sure what you mean when you say that i can merge them when ever i want.  Why would i want to do that? Or are you just saying that if i change my mind then i can merge them together some how?

Q

Andrew.Lukasik

  • Full Member
  • ***
  • Posts: 134
    • my twitter @andrewlukasik
Re: Working with Scenes
« Reply #4 on: October 20, 2011, 12:18:08 PM »
Jeanfabre made very good point - because (depending on game type) you can slice entire game world - island, for example - into chunks, and put them into separate scenes. Then depending on your position you can load/unload different chunks of that island (using Application.LoadLevelAdditive - PM has it already) to save resources such memory and CPU
« Last Edit: October 20, 2011, 12:19:40 PM by Andrew_Raphael_Lukasik »

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Working with Scenes
« Reply #5 on: October 20, 2011, 12:25:58 PM »
Ahhh i see.. So you dont have to switch from scene to scene but you can do an Additive kind of progression between them.. I assume there is also a Subtractive version as well maybe..

For myself i think i will just have an opening scene with menu and splash stuff etc and then switch to the main scene.. Although i do have a second section there that might be able to be split off.

So for editing and testing was my premise correct? I can only have one scene open at a time so if i am just editing the main scene it will start up from its beginning not from the beginning of the opening scene.. I dont think it would make any sense anyway..

Hope to get onto this in the next hour or so

Q

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Working with Scenes
« Reply #6 on: November 01, 2011, 02:02:48 AM »
Hi,

 no substractive system for scenes unfortunatly. you can of course roll your own, but if you want to remove chuncks, you just delete the GameObjects and that's it.

during editing, yes you can only have one scene open at a time. I wish we could additively open scenes in read only  to really build  complex things easily... but no.

Bye,

 Jean

qholmes

  • 1.2 Beta
  • Hero Member
  • *
  • Posts: 509
Re: Working with Scenes
« Reply #7 on: November 01, 2011, 06:28:49 AM »
Thanks Jean,

My jump into multiple scenes was good. Worked perfect and i appreciated the ability to write to global variables in my start up scene to initialize things like language selecting and starting view settings etc.

worked like a charm

Q