6
\$\begingroup\$

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?

\$\endgroup\$
6
  • \$\begingroup\$ You have two separate questions; how and when to load data, and how to check if something is in camera shot. \$\endgroup\$ Mar 18, 2011 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\$
    – Tito
    Mar 18, 2011 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\$ Mar 18, 2011 at 16:34
  • \$\begingroup\$ Okay done hopefully that's more to the point? \$\endgroup\$
    – Tito
    Mar 18, 2011 at 16:39
  • 1
    \$\begingroup\$ gamedev.stackexchange.com/questions/1171/… Might also be of use to you. \$\endgroup\$ Mar 18, 2011 at 17:11

1 Answer 1

4
\$\begingroup\$

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)
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .