Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

Where should this code go?

Started by Nicholas Kong May 25, 2013 at 1:39 PM 0 replies 1.1k views
Original Post
Nicholas Kong
Nicholas Kong
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.
Mathematix
Mathematix
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.