HTML and CSS Reference
In-Depth Information
Chapter 9
Bootstrapping the Quintus Engine: Part I
What's in this chapter?
• Designing and creating the Quintus API
• Creating an efficient game loop
• Adding classical inheritance to JavaScript
• Building an event system
• Creating a component system
Wrox.com Code Downloads for this Chapter
The wrox.com code downloads for this chapter are found at www.wrox.com/rem-
title.cgi?isbn=9781118301326 on the Download Code tab. The code is in the chapter 09 download and individu-
ally named according to the names throughout the chapter.
Introduction
This chapter covers the initial bootstrapping of the Quintus HTML5 Mobile-friendly Game Engine, the reusable,
developer-friendly engine used in the rest of the topic. This chapter discusses the basic connective tissue of the
engine, whereas the next chapter talks about loading and rendering assets and handling user input.
JavaScript is not a language originally intended for game development, but it has come a long way since being
primarily used as a language for dynamically checking and unchecking check boxes. JavaScript now fits well as
a language for interactive game development.
Creating a Framework for a Reusable
HTML5 Engine
Although the game built in Chapters 1 through 3 is perfectly acceptable for a one-off game, the code is fairly
brittle and specific to the game itself. In the next few chapters, you put together a more general engine that allows
for better code reuse from game to game.
This engine is going to be called Quintus . Quintus means “fifth” in Latin (which seemed appropriate) and will
be used for the rest of the games built in this topic. As mentioned in Chapter 6, “Being a Good Mobile Citizen,”
the engine has two dependencies: jQuery and Underscore.js. You've seen that you can build a game in HTML5
Search WWH ::




Custom Search