Game Object Types

  • Arjan Egges


In the previous chapters, you’ve seen how to create a game world that contains a few different game objects, such as a cannon and a ball. You’ve seen how to let game objects interact with each other. For example, the ball object updates its color according to the color of the cannon. In this chapter, you add falling paint cans to the game world. However, before you can do that, you have to reexamine how to create and manage objects in JavaScript. I introduce the class concept as a means to create multiple game objects of a certain type. Then, you apply the class concept to other parts of the Painter game application. Furthermore, you learn how to incorporate randomness in your games.


Global Variable Initialize Method Minimum Velocity Random Velocity Vector2 Class 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Arjan Egges 2014

Authors and Affiliations

  • Arjan Egges
    • 1
  1. 1.UtrechtThe Netherlands

Personalised recommendations