I'm new to games programming and am wondering what tactics games use to pre-load entity and map data. Will a game initialise with the fundamental map data stored in memory?

  • \$\begingroup\$ You have two separate questions; how and when to load data, and how to check if something is in camera shot. \$\endgroup\$ – The Communist Duck Mar 18 '11 at 16:28
  • \$\begingroup\$ Okay, then my main question is; does a game load every single object(in a basic kind of way?) that will be used, when it starts? \$\endgroup\$ – Titus Mar 18 '11 at 16:30
  • \$\begingroup\$ I would edit out the last part of your question then, and maybe ask it as a separate question later? \$\endgroup\$ – The Communist Duck Mar 18 '11 at 16:34
  • \$\begingroup\$ Okay done hopefully that's more to the point? \$\endgroup\$ – Titus Mar 18 '11 at 16:39
  • 1
    \$\begingroup\$ gamedev.stackexchange.com/questions/1171/… Might also be of use to you. \$\endgroup\$ – The Communist Duck Mar 18 '11 at 17:11

I'd say this really depends on what type of game you're making, but some general points.

  1. Only load what you absolutly know you need immediatly, or you know you'll need soon
  2. Only remove things from memory when you absolutly know you wont need them again AND you need to load something that fits the constraints of #1 AND you've reached your memory limit
  3. A general understanding of Paging and Virtual Memory of Operating Systems can be applied to games in terms of when to remove data from memory -- that is to say, those ideas can be applied to game systems because many games have "OS like" requirements (fast, direct access to memory, input, and network devices)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.