Core HTML5 2D Game Programming

av David Geary. Häftad, 2014

Pris:  251:-
Skickas inom 7-10 vardagar.
Fri frakt inom Sverige för privatpersoner vid beställning på minst 99 kr!

Passar bra ihop

Core HTML5 2D Game Programming + Introduction to Game Design, Prototyping, and Development
De som köpt den här boken har ofta också köpt Introduction to Game Design, Prototyping, and Development (häftad) av Jeremy Gibson Bond
Pris för båda:

Kundrecensioner

Har du läst boken? Bli först att betygsätta och recensera boken .

 (häftad)
Fler böcker inom
  • Häftad (Paperback)
  • Språk: Engelska
  • Antal sidor: 640
  • Utg.datum: 2014-07-28
  • Upplaga: 1
  • Förlag: Prentice Hall
  • Illustrationer: illustrations
  • Dimensioner: 228 x 177 x 25 mm
  • Vikt: 839 g
  • Antal komponenter: 1
  • ISBN: 9780133564242

Bloggat om

Övrig information

David Geary, a prominent author, speaker, and consultant, is a leading expert on advanced web application development. He's the author of eight Java books, including the industry's best-selling guides to Swing and JavaServer Faces, and he co-founded the HTML5 Denver User's Group. A three-time JavaOne Rock Star, he speaks frequently at conferences. Follow him on Twitter at @davidgeary.

Innehållsförteckning

Preface xv

Acknowledgments xxi

About the Author xxiii

 

Chapter 1: Introduction 1

1.1 Snail Bait 3

1.2 HTML5 Game Development Best Practices 10

1.3 Special Features 16

1.4 Snail Baits HTML and CSS 18

1.5 Snail Baits Humble Beginning 25

1.6 The Use of JavaScript in This Book 28

1.7 Conclusion 31

1.8 Exercises 31

 

Chapter 2: Raw Materials and Development Environment 33

2.1 Use Developer Tools 35

2.2 Obtain Assets 50

2.3 Use CSS Backgrounds 54

2.4 Generate Favicons 56

2.5 Shorten the Coding Cycle 58

2.6 Conclusion 59

2.7 Exercises 60

 

Chapter 3: Graphics and Animation 61

3.1 Draw Graphics and Images with the HTML5 canvas Element 64

3.2 Implement Smooth HTML5 Animations 70

3.3 Implement a Game Loop 75

3.4 Calculate Frame Rates 77

3.5 Scroll the Background 78

3.6 Create Time-Based Motion 85

3.7 Reverse Scroll Direction 86

3.8 Draw Animation Frames 86

3.9 Use Parallax to Create the Illusion of Depth 87

3.10 Conclusion 90

3.11 Exercises 90

 

Chapter 4: Infrastructure 93

4.1 Encapsulate Game Functions in a JavaScript Object 95

4.2 Understand JavaScripts Persnickety this Reference 100

4.3 Handle Keyboard Input 103

4.4 Pause or Resume the Game When the Player Presses the p Key 105

4.5 Freeze the Game to Ensure It Resumes Exactly Where It Left Off 107

4.6 Pause the Game When the Window Loses Focus 108

4.7 Resume a Paused Game with an Animated Countdown 110

4.8 Conclusion 115

4.9 Exercises 116

 

Chapter 5: Loading Screens 117

5.1 Define Snail Baits Chrome 120

5.2 Fade Elements In and Out with CSS Transitions 123

5.3 Fade Any Element In or Out That Has a CSS Transition Associated with Its Opacity 132

5.4 Implement the Loading Screen 135

5.5 Reveal the Game 140

5.6 Conclusion 144

5.7 Exercises 144

 

Chapter 6: Sprites 147

6.1 Sprite Objects 149

6.2 Incorporate Sprites into a Game Loop 156

6.3 Implement Sprite Artists 160

6.4 Create and Initialize a Games Sprites 167

6.5 Define Sprites with Metadata 171

6.6 Scroll Sprites 174

6.7 Conclusion 176

6.8 Exercises 177

 

Chapter 7: Sprite Behaviors 179

7.1 Behavior Fundamentals 182

7.2 Runner Behaviors 184

7.3 The Runners Run Behavior 187

7.4 Flyweight Behaviors 190

7.5 Game-Independent Behaviors 193

7.6 Combine Behaviors 199

7.7 Conclusion 205

7.8 Exercises 206

 

Chapter 8: Time, Part I: Finite Behaviors and Linear Motion 207

8.1 Implement an Initial Jump Algorithm 209...