Chapter 4. Translating Game State Changes to the Display
Animation is a powerful visual cue to show players how their actions affect a game. Whenever a player causes the game state to change, you need to display the results. In this chapter, you’ll add code to detect and remove bubble groups, learn more about animating CSS sprites, and implement a nifty exploding effect in jQuery.
At this point, players can fire bubbles at the game board, and those bubbles will become part of the bubble grid. Now, we need to pop groups of matching bubbles when a player fires the correct color at them. When curBubble
is fired into another bubble and a group of three or more matching bubbles forms, all bubbles in that group should show a popping animation and then ...
Get Build an HTML5 Game now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.