2014 | OriginalPaper | Chapter
28. Adding Player Interaction
Published in:
Building JavaScript Games
Abstract
In this chapter, you add more interaction between the player and the objects in the level. Currently, the player can walk around, and a basic physics system allows the player to jump, collide with wall tiles, or fall out of the screen. First you look at a very simple kind of interaction: collecting water drops. Then you see how to create the behavior that allows the player to slide over ice. Finally, you focus on the part of the program that deals with the various player-enemy interactions in the game.