Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by danicor

I'm developing an application that contains many minigames... I need to load modules dynamically and not statically (module and requires) because the waiting time is getting longer with every new minigame.

I have some idea about this but I need help from someone who knows ImpactJS to make it clean.

Example of a first approach:

Example:

	ig._loadScript('X', 'Y');

	setTimeout(loadGame, 3000);

	function loadGame() {
		var game = Task.getTaskName(get('game'));
		ig.main('#canvas', game, 60, window.innerWidth * scale, window.innerHeight * scale, 1, NptLoader);
	}

1 decade ago by danicor

Link to a possible solution:

http://mandarin.no/dynamic-loading-of-assets-entities-and-levels-in-impactjs/

Thx
Page 1 of 1
« first « previous next › last »