Game Development Reference
In-Depth Information
Figure 2-9. Preloader animating to mimic load progress
This preloader is a nice, practical example of what you can do with graphics in EaselJS. You managed to create a
visually rich feature using nothing but a little math and the built-in drawing API. You'll be wrapping this preloader up
nicely in its own reusable object in Chapter 8, but the drawing techniques will remain the same.
Summary
This chapter demonstrates the amount of visual development that you can accomplish without loading a single asset.
The drawing API gives you the power to create visuals, from primitive shapes to complex paths and gradients. With a
little help from Drawscript, your shapes and colors can get even more detailed by allowing you to draw them inside
of Illustrator and pasting the code into your application. We also took a quick look at animations using both TweenJS
and more advanced, manual approaches achieved by tapping into the interval fired from the Ticker class.
Lastly, you used your newly learned drawing skills to create a practical UI element that will give visual feedback
that can be used with PreloadJS or other situations where the user needs to wait for action.
Now that you have custom graphics added to the stage, the next logical step in game development is making
them react to user input, as well as give the user feedback on their progress.
 
Search WWH ::




Custom Search