Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualKhatharr

Posted 30 December 2012 - 05:17 PM

Ah, I sort of expected that this would be the first thing you asked about. What you're looking for is a "state manager". Rather than just using one huge loop you create 'states' or 'scenes' (depending who you talk to - they're the same thing) that get plugged into the main loop. The logic for the section you're in is inside the state/scene.
 
I think L.Spiro wrote a nice article about it... Hang on a sec...
 
Yeah, here we go. I was looking over this while I was fiddling with my scene manager a while ago.
 
http://lspiroengine.com/?p=351
 
As for different stages/levels you can break them into data units (the map and resources, etc required for that stage) and then have your map state/scene load the data unit, run with that data until you move to another one, then just unload the current one and load the new one.
 
This forum formatting bug is killing me... -.-

#2Khatharr

Posted 30 December 2012 - 05:15 PM

<p>Ah, I sort of expected that this would be the first thing you asked about. What you're looking for is a &quot;state manager&quot;. Rather than just using one huge loop you create 'states' or 'scenes' (depending who you talk to - they're the same thing) that get plugged into the main loop. The logic for the section you're in is inside the state/scene. I think L.Spiro wrote a nice article about it... Hang on a sec...</p>
<p>&nbsp;</p>
<p>Yeah, here we go. I was looking over this while I was fiddling with my scene manager a while ago.</p>
<p>&nbsp;</p>
<p><a href="http://lspiroengine.com/?p=351">http://lspiroengine.com/?p=351</a></p>
<p>&nbsp;</p>
<p>As for different stages/levels you can break them into data units (the map and resources, etc required for that stage) and then have your map state/scene load the data unit, run with that data until you move to another one, then just unload the current one and load the new one.</p>

#1Khatharr

Posted 30 December 2012 - 05:11 PM

Ah, I sort of expected that this would be the first thing you asked about. What you're looking for is a "state manager". Rather than just using one huge loop you create 'states' or 'scenes' (depending who you talk to - they're the same thing) that get plugged into the main loop. The logic for the section you're in is inside the state/scene. I think L.Spiro wrote a nice article about it... Hang on a sec...


PARTNERS