BSG-TUDelft / Utopolis

City building game for TU Delft course (IN4302TU)
2 stars 2 forks source link

Smarter loading #124

Closed spassvogel closed 10 years ago

spassvogel commented 10 years ago

Rather than loading and caching all of the assets at initialization, it would be better if the model got loaded just in time, so first all the buildings in a players' city are cached, and then when a player decides to want to place another building, load the model when player clicks on the icon.

Related: #8

spassvogel commented 10 years ago

Right now the client has to download 50 mb at once... that's wayy too much.

spassvogel commented 10 years ago

A smarter, just in time loading mechanism speeds up the games initial loading tremendously (unless, of course you have a city with ALL the buildings in it ¯(ツ)/. But if not, it really cuts down on the time to load the assets.

After you logged in, the buildings you have in your city will be loaded before they are displayed. Any other buildings are not loaded.

When you click on a structure icon, the building is loaded and cached.

image