Animate screen while loading textures

Posted by Omega on Stack Overflow See other posts from Stack Overflow or by Omega
Published on 2012-03-19T00:44:45Z Indexed on 2012/03/19 2:04 UTC
Read the original article Hit count: 175

My RPG-like game has random battles. When the player enters a random battle, it is necessary for my game to load the textures used within that battle (animated monsters, animations, etc). The textures are quite a lot, and rather big (the battles are very graphical intensive).

Such process consumes significant time. And while it is loading, the whole screen freezes.

The game's map freezes, and the wait time is significant - I personally find it annoying.

I can't afford to preload the textures because, after doing some math, I realized:

  • If I preload all the textures at the beginning of the game, the application will definitely crash.
  • If I preload the textures that are used in a specific map when the player enters the map, the application is very likely to crash as well.
  • I can only afford to load the textures when I need them, and dispose of them as soon as the battle ends.

I'd prefer to not use a "loading screen" image because it affects my game's design and concept. I want to avoid this approach.

If I could do some kind of animation while loading the textures, it would be great, which leads to my question: is that possible? What kind of animation, you ask? Well, how about... you remember when Final Fantasy used to distort the screen while apparently loading the textures? Something like that. But well, distorting is quite a time-consuming process as well, so maybe just a cool frame-by-frame animation or something.

While writing this, I realized that I could make small pauses between textures (there are multiple textures), and during such pauses, I update the screen to represent the animation's state. However, this is very unlikely to happen, because each texture is 2048x2048, so the animation would be refreshed at a rather laggy (and annoying) rate. I'd prefer to avoid this as well.

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about ios