I’m aware that older games would reuse sprites as much as possible (Like the bushes and clouds in Mario, or slime and red slime in dragon quest), how did they manage their sprites? Did they preload everything at the beginning, or did they load and unload as needed?

I had assumed the latter, but many games on the seas genesis, snes, gbc, etc have a sprite test mode which leads me to believe that they simply preloaded everything. Or is it possible that they used a combination of the two?

  • 1
    \$\begingroup\$ Obviously some preloaded, some loaded and unload. What is the real question? \$\endgroup\$ – Kromster May 11 '18 at 14:49
  • 2
    \$\begingroup\$ I'm voting to close this question as off-topic because it is about how other games accomplished a particular technique. \$\endgroup\$ – user1430 May 11 '18 at 15:18
  • \$\begingroup\$ There are many old games & they don't necessarily handle sprites the same way. Even if you picked one game, unless someone from the dev team is here, it's unlikely that we'll know exactly what they did. If you feel that knowing the answer might help you with a problem you're having about your own game, please ask about that problem instead. \$\endgroup\$ – Pikalek May 11 '18 at 15:28
  • 1
    \$\begingroup\$ @JoshPetrie My apologies, I didn't know this would be considered off-topic here. The question was originally posted on Arqade, but I directed the OP here \$\endgroup\$ – Wondercricket May 11 '18 at 15:28
  • \$\begingroup\$ @Wondercricket No worries :) \$\endgroup\$ – Vaillancourt May 11 '18 at 15:29

Reusing sprites is a different thing than loading everything from the beginning. Both techniques are used either together or separate.

The example you mentioned with clouds and bushes simply means that the game loads one sprite (the cloudy-bush thingy) and uses it to draw both the bushes and the clouds. So only one sprite exists in memory, but multiple things are drawn on the screen (with some colour alternation).

Preloading everything from the beginning is another issue. In some cases you don't have the luxury of a good CPU to load a lot of data on the fly, so perhaps it is better to load everything on the beginning, especially if the game is small. It is also cheaper to include multiple sprites into a single texture, so if a game (like the old ones) is small enough to fit all sprites in a texture, then they load everything anyway.

What should you use? In today's hardware, nobody really comes to that issue. If you use a library to handle graphics for you, then you only declare when you will use them, and it's the library's responsibility to decide when to load them.

Unless you are advanced enough to want to make games for older consoles with harder programming languages like assembly, such a person would know how to load graphics manually depending on the platform.

For more information it would be better to ask the teams that actually made older games.

| improve this answer | |

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