Comment 25 for bug 535806

Revision history for this message
Jens Beyer (qcumber-some) wrote :

In https://code.launchpad.net/~qcumber-some/widelands/animations you can find a proof-of-concept for testing (this is not yet intended for merge into trunk) what happens if we load the animations on demand, not as preload function.
Of course this first means tremendous improvement in the startup time of a game/map/match/scenario. On a second note, this also does it for the editor, which was basically the worst case for tribes (but not for other animations).
Then, even loading a game of 3 hours "sun of fire" map with all players and tribes, feels much better.
Even on my old slow computer, loading a single animation does not really take much time, so this does not really block the game. Starting a new map triggers immediate loading of about 20 animations - also not much, this goes within 200ms.
And the third note (which is puzzling...): Starting a new game "sun of fire" without fog of war with all players and tribes, my computer gets *with preloading* an average 10fps on the starting point of player1. With this branch and on-demand loading of animations, the game starts with a whopping 16fps average.
I didn't compare memory footprint yet.

Feel for yourself, I'd say. Give it a try.

If this way is blocking the game too much for only some people, I can imagine having an option saying "preload animations on map start/loading". I would prefer the on-demand loading.

This should of course only be a stepstone to implementing MNG support which has other advantages. But I believe those two things don't exclude each other.