Sometimes, you need to use images in your games, in order to give the user the best experience possible; you’ll preload these images before the game starts and provide the user with constant updates regarding the loading status while they're waiting.
- [Instructor] Hello and welcome…to the section one on CreateJS.…In this video we're gonna learn…how to preload graphic assets using PreloadJS,…calculate the loading percentage and display the graphics.…We're gonna start off as usual using our HTML5 template,…which already contains the importing of the CreateJS library…in the body tag we're gonna add an event for unload,…which is going to call a function called init.…
In the init function we're gonna add…the entire functionality, we're gonna start off by…creating a new variable called queue.…The queue variable will be initiating…using new, CreateJS, dot, load queue.…The load queue element will assist this…in creating a loading queue for loading the graphic assets,…PreloadJS can be used to loading other elements,…not just graphic assets, it can be used to load sounds…and it can be used to load files.…
So we're going to write var queue, new, createjs.LoadQueue.…Now we're going to write the init's function.…The load queue object in CreateJS…has a few events which we can listen to…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Playing sounds in various browsers using SoundJS
- Tweening objects using TweenJS
- Creating graphic assets and basic animations
- Game stage creation and object positioning
- Adding the basic game logic
- Add the game physics
- Adding mouse and keyboard controls
- Debugging with breakpoints in Chrome
- Debugging on Android and iOS
- Character movement and input handling