delay loading of Textures and load on demand.

Post your help queries and engine programming questions here

delay loading of Textures and load on demand.

Postby robaldred » Tue Feb 11, 2014 1:01 pm

I'm working on a game with a large amount of assets.
Assets for combinations of character models and animations.

I'd like to be able to load assets on a per level basis, rather than all at the beginning.
Is this possible at all, it seems that Texture's are loaded immediately.

I'd like to have a manifest of assets for each level and on demand tell the texture's to load.

I was thinking about creating a IgeDelayedTexture class, where the load method is called manually, instead of via the initialisation.

Thoughts?
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England

Re: delay loading of Textures and load on demand.

Postby stokaboka » Mon Jun 02, 2014 5:54 am

Examples of textures loaded client.js and elements are mounted on the scene after loading all textures.

I in this way only load backgrounds. everything else is loaded from the classes (for example - "Character")
Constructor (init: function...) creates texture, on event "loaded" character is mounted on the stage

but I would have thought about caching textures for reuse.
to use the already loaded texture for similar items.
stokaboka
 
Posts: 14
Joined: Fri Nov 08, 2013 6:13 am

Re: delay loading of Textures and load on demand.

Postby robaldred » Mon Jun 02, 2014 11:44 am

Hey,thanks for your reply.
I have actually got this working quite nicely.

I'm using addGraph to add and remove levels from the sceneGraph, at this point I load the textures and hook into the texturedLoaded event.
I don't work for Irrelon. All comments are my own.
I would strongly encourage anyone building production projects with Isogenic to buy a premium licence, it costs very little and will help towards continued development of the engine. Irrelon have spent thousands of hours developing this wonderful platform with many features found in AAA game engine.
User avatar
robaldred
 
Posts: 243
Joined: Wed Oct 23, 2013 8:09 pm
Location: Manchester, England


Return to Help & Questions

Who is online

Users browsing this forum: No registered users and 1 guest
cron