Abstract
In this chapter, you start to create a game called Painter. In this game, you need to show sprites that move on the screen. You’ve already seen a few examples of loading and displaying sprites. Also, you’ve seen that it’s possible to use the current time information to change the position of a sprite. You build on these examples to begin creating Painter. Furthermore, you learn how to deal with player input in your game. You see how to retrieve what the player is doing and how the game world changes depending on that information. You start with a simple extension of the FlyingSprite program that draws a balloon at the position of the mouse pointer. The next chapter examines other types of input, such as keyboard and touch input.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2014 Arjan Egges
About this chapter
Cite this chapter
Egges, A. (2014). Knowing What the Player Is Doing. In: Building JavaScript Games. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6539-9_5
Download citation
DOI: https://doi.org/10.1007/978-1-4302-6539-9_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-6538-2
Online ISBN: 978-1-4302-6539-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books