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

Is there a downside to statically adding gameobjects in a game?

This topic is 1912 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

Is there a downside to statically adding gameobjects in a game?

 

I am not sure if they are just used for adding gameobjects when a certain flag is turned on. But that is what I am using it for. So they are not loaded ahead of the time when the game starts.

 

 

If I choose the non-static approach of adding gameobjects, it meant I needed to load everything ahead of time. While the non-static way was good it for loading objects ahead of time, it might be deemed inefficient when you are loading A LOT of game objects ahead of time.

Share this post


Link to post
Share on other sites
Advertisement
This kind of highly depends on the type of game you're making, if it was a very simple pong game or something and it wouldn't hurt to load everything when the program started, yeah, you could theoretically do it.

There's just not much of a point to when it's much simpler and generally more intuitive to create the game objects when you're setting the other data related to the game and setting up the game loop and such.

It's not really so much performance as control and readability, though of course performance would become a major issue after certain complexity is reached, you can't really "unload" a static object.

Share this post


Link to post
Share on other sites

This kind of highly depends on the type of game you're making,

 

i'm making a "guess a word" game. The game displays an image. The number of underscores that appears along with the image gives you a hint on what the word can possiby be. The image of the letter that appears when the user types a key triggers of that letter to appear. That particular letter which is represented by an image is not loaded and draw until the user presses that specific key to trigger the letter.

Edited by warnexus

Share this post


Link to post
Share on other sites

What do you think static and non-static mean? What you're saying doesn't make any sense according to my understand of the word "static".

 

It looks like you might make sense if the topic was lazy vs. non-lazy loading. Is that what you mean?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!