Jump to content
  • Advertisement
Sign in to follow this  
Nicholas Kong

Where should this code go?

This topic is 1851 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

This question is related to when to load game resources or creating game objects references.
Example: I created an Alien object reference in the Game constructor even though it does not get added into the game until a certain requirement is fulfilled. 
 
I never understood when to create game object references even though they do not appear until the later parts of the game.
Edited by warnexus

Share this post


Link to post
Share on other sites
Advertisement
You load your game objects when they are most likely to be used and when the process of loading them will not cause a performance hit.

You can also do it between level loads of course with a loading screen.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!