Muutke küpsiste eelistusi

Foundation Game Design with HTML5 and JavaScript 1st ed. [Pehme köide]

  • Formaat: Paperback / softback, 732 pages, kõrgus x laius: 235x191 mm, kaal: 1411 g, XXVI, 732 p., 1 Paperback / softback
  • Ilmumisaeg: 27-Nov-2012
  • Kirjastus: APress
  • ISBN-10: 1430247169
  • ISBN-13: 9781430247166
Teised raamatud teemal:
  • Pehme köide
  • Hind: 95,19 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 111,99 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 3-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 732 pages, kõrgus x laius: 235x191 mm, kaal: 1411 g, XXVI, 732 p., 1 Paperback / softback
  • Ilmumisaeg: 27-Nov-2012
  • Kirjastus: APress
  • ISBN-10: 1430247169
  • ISBN-13: 9781430247166
Teised raamatud teemal:
Foundation Game Design with HTML5 and JavaScript teaches you everything you need to know about how to make video games. If you’ve never done any programming before and don’t know where to start, this book will show you how to make games from start to finish. You’ll learn all the latest programming technologies (HTML5, CSS, and JavaScript) to create your games. All written in a fun and friendly style with open-ended projects that encourage you to build your own original games.

Foundation Game Design with HTML5 and JavaScript starts by showing you how you can use basic programing to create logic games, adventure games, and create interactive game graphics. Design a game character, learn to control it with the keyboard, mouse, or touch screen interface, and then learn how to use collision detection to build an interactive game world. You’ll learn to make maze games, platform jumping games, and fast paced action games that cover all the popular genres of 2D gaming. Create intelligent enemies, use realistic physics, sound effects and music, and learn how to animate game characters. Whether you're creating games for the web or mobile devices, everything you need to get started on a career as a game designer is right here.

  • Focused and friendly introduction to making games with HTML5.
  • Essential programming and graphic design techniques for building games, with each chapter gently building on the skills of preceding chapters.
  • Detailed case studies demonstrating techniques that can be used for making games in a wide variety of genres.
About the Author xvii
About the Technical Reviewer xix
About the Cover Image Artist xxi
Acknowledgments xxiii
Introduction xxv
Chapter 1 Learning HTML and CSS
1(58)
What you need
2(2)
A computer
2(1)
Programming software
2(1)
Graphic design software (optional)
3(1)
What kinds of games can I make?
4(1)
Learning HTML
4(13)
Tags
5(1)
Structuring HTML documents
6(1)
A basic web page
7(10)
Make it prettier with CSS
17(19)
Font styles
20(6)
List styles
26(2)
Borders, padding, height, and width
28(3)
Cascading styles
31(1)
Using <DIV> elements
31(5)
Loading background images into HTML elements
36(14)
Positioning elements with CSS
38(1)
Floating elements
39(10)
More about block sizes: The box model
49(1)
Organizing your files
50(6)
Separating HTML and CSS code
50(2)
Organizing code and media
52(4)
Learning more about HTML and CSS
56(1)
Summary
57(2)
Chapter 2 Learning JavaScript
59(52)
Setting up
59(5)
Displaying messages in the console
61(2)
What should you do if your program doesn't work?
63(1)
Variables
64(24)
Working with numbers
65(5)
Working with true or false variables
70(1)
Decision making
70(4)
Checking more conditions
74(4)
Using && and ||
78(2)
Using functions
80(8)
Controlling HTML and CSS
88(17)
Creating new text in an HTML element
88(2)
Changing CSS with JavaScript
90(3)
Clicking on buttons
93(5)
Counting
98(5)
Entering and displaying text
103(2)
Organizing your JavaScript code
105(3)
Linking the JavaScript program to the HTML document
106(1)
Using the program.js file
107(1)
A quick guide to debugging code
108(2)
Summary
110(1)
Chapter 3 Your First Games
111(68)
A basic number-guessing game
113(15)
Initializing variables
115(1)
Using functions to modularize the program
115(1)
Forcing strings to become numbers
116(3)
Displaying the game state
119(3)
Winning and losing
122(5)
Modular programming with functions
127(1)
Polishing up
128(13)
Allowing only numbers to be entered
129(2)
Using the Enter key to input numbers
131(1)
Improving the user interface
132(2)
Creating random numbers
134(5)
Finishing the game
139(2)
Making really nice buttons
141(8)
Round corners
144(1)
Gradients
145(2)
Drop shadows
147(1)
Understanding the :hover and :active states
147(2)
Seeing the game
149(8)
Adding a visual display to the number-guessing game
149(8)
Alien Attack!
157(20)
Setting up the game
163(4)
Figuring out if the alien has been hit
167(3)
Moving the game objects
170(1)
Making the game better
171(6)
Summary
177(2)
Chapter 4 Creating a Game World
179(64)
Loops
180(5)
Using arrays for storing lots of information
185(13)
Array basics
186(2)
Pushing elements into an array
188(1)
Removing elements from an array
189(5)
Searching arrays
194(1)
A simple database
195(3)
Making an adventure game
198(29)
Drawing the map
198(2)
Moving around the world
200(4)
Finding the player's action
204(4)
Adding images
208(3)
Checking game-world boundaries
211(4)
Game items
215(12)
The complete code listing
227(10)
Creating quests and puzzles
235(2)
Making your own game
237(4)
Summary
241(2)
Chapter 5 Making Maps
243(54)
Arrays inside arrays
243(12)
Looping through a 2D array
246(3)
Visualizing 2D arrays
249(6)
Case study: Island Adventure
255(40)
Drawing the map
256(4)
Displaying the map
260(3)
Adding the ship
263(3)
Moving the ship
266(7)
Figuring out where the ship is
273(1)
Creating the game
274(12)
Adding the monster
286(1)
Moving the monster
287(8)
Summary
295(2)
Chapter 6 Game Objects and Animation
297(76)
Displaying images with canvas
298(8)
Using the canvas's drawImage method
301(5)
How to make objects
306(4)
Object properties
306(2)
Object methods
308(1)
Using object properties inside methods
309(1)
Making copies of objects
310(4)
Adding new properties and methods
311(1)
Looping through objects
311(3)
Object states
314(8)
Displaying the states with canvas
315(7)
Timed state changes
322(7)
Using setTimeout
322(7)
Animation
329(17)
Frames and tilesheets
330(2)
An object for animation
332(5)
Using a tilesheet with more than one row
337(2)
Looping animations
339(2)
Randomly starting animations
341(5)
Monster Smash!
346(26)
Making a smashable monster
347(5)
Making lots of monsters
352(7)
Clicking on the monsters
359(2)
Finishing the game
361(11)
Summary
372(1)
Chapter 7 Game Sprites
373(70)
Sprites
374(7)
Creating a basic animated sprite
374(2)
Making sprites
376(2)
Setting up the canvas and sprite images
378(1)
Animating and displaying a sprite
379(2)
requestAnimationFrame
381(2)
Making many sprites
383(3)
Using individual image files for each sprite
386(1)
An interactive sprite
386(3)
Moving the sprite
387(1)
Making it bigger and smaller
387(1)
Hiding and showing the sprite
388(1)
An interactive sprite with rotation
389(10)
Adding transparency
394(2)
Adding shadows
396(1)
Using the final render function
397(2)
Using HTML sprites
399(1)
Moving a sprite with the keyboard
399(11)
Moving with velocity
404(1)
Using the keyboard's arrow keys
405(2)
Figuring out if a key is not being pressed
407(1)
Making the sprite move
408(2)
Setting screen boundaries
410(9)
Blocking movement at the screen edges
411(7)
Screen wrapping
418(1)
Scrolling
419(18)
Better scrolling
424(5)
Parallax scrolling
429(8)
Moving a sprite with the mouse and touch
437(5)
Chasing the mouse
437(3)
Moving a sprite by touch
440(2)
Summary
442(1)
Chapter 8 Bumping Into Things
443(44)
Point collisions
444(7)
The hitTestPoint function
446(3)
Rendering canvas text
449(2)
Circle collisions
451(10)
Detecting collisions between circles
452(4)
Programming the circle collision code
456(3)
Preventing the circles from overlapping
459(2)
Rectangle collisions
461(24)
Detecting collisions between rectangles
462(6)
Changing a sprite's state
468(3)
Changing a character's health meter
471(3)
Updating a score
474(2)
Preventing rectangles from overlapping
476(3)
Using the blockRectangle function
479(6)
Using collision functions in your games
485(1)
Summary
486(1)
Chapter 9 Making Video Games
487(46)
The file and folder structure
488(2)
The tilesheet
489(1)
The HTML file
489(1)
Starting the project
490(9)
The alienArmada1.js file
491(4)
Loading multiple assets
495(2)
Using a game state manager
497(2)
Firing missiles
499(5)
Making aliens
504(6)
The alienObject
505(1)
The alien timer
505(2)
The makeAlien function
507(1)
Moving the aliens
508(2)
Shooting down aliens
510(3)
Displaying game messages
513(4)
Setting up the game messages
514(2)
Displaying the score and ending the game
516(1)
Displaying the game over messages
516(1)
Adding sound
517(4)
Loading sounds
518(2)
Playing sound effects
520(1)
The final game code
521(10)
Summary
531(2)
Chapter 10 Maze Games
533(68)
Planning maze games
534(2)
Building the maze
536(10)
Designing the maze with 2D arrays
536(3)
The BUILD_MAP game state
539(2)
Building the level map
541(4)
Layering the map level arrays
545(1)
Making bigger sprites and game messages
546(2)
Playing Time Bomb Panic
548(8)
Moving the player character
548(2)
Collisions with the boxes and the screen boundaries
550(1)
Defusing the bombs
551(1)
The game timer
552(3)
Ending the game
555(1)
The complete code for Time Bomb Panic
556(9)
Scrolling Time Bomb Panic
565(6)
Making big level maps
566(1)
Adding gameWorld and camera objects
567(1)
Scrolling the camera
568(1)
Preventing the UI sprites from scrolling
569(1)
Rendering the scrolling game world
570(1)
Wandering maze monsters
571(21)
A moving monster
572(3)
Navigating maze walls
575(4)
Changing the monster's direction
579(9)
Hunting the player
588(3)
Changing the monster's state
591(1)
More about pathfinding
592(1)
Switching game levels
592(7)
Keep level maps in arrays
594(1)
Use a LEVEL_COMPLETE state
595(1)
Loading the next level
596(3)
Using a tile map editor
599(1)
Summary
600(1)
Chapter 11 Platform Games and Physics
601(70)
Natural motion using physics
602(37)
A new spriteObject for physics and platform games
603(1)
Acceleration
604(9)
Friction
613(2)
Bouncing
615(14)
Gravity
629(2)
Jumping
631(5)
Jumping on platforms
636(3)
Hedgehog Apocalypse!
639(31)
Designing the level
640(3)
The level map arrays
643(2)
Initializing the game objects and object arrays
645(1)
Building the level map
645(2)
Creating the user interface
647(1)
Jumping on boxes
648(1)
Moving the hedgehogs
648(5)
Squashing the hedgehogs
653(3)
Ending the game
656(1)
Preventing the arrow keys from scrolling the browser window
657(1)
The complete code listing
657(13)
Summary
670(1)
Chapter 12 Touch and the Mouse
671(49)
Finding the mouse and touch X and Y positions
671(5)
Using the mouse
672(1)
Using touch
673(3)
Moving a sprite with easing
676(4)
Optimizing easing
678(1)
Click to move an object
679(1)
A mouse-based and touch-based platform game
680(1)
Mouse-based platforms
680(1)
Touch-based platforms
681(1)
Rotation
681(15)
Rotating sprites with canvas
682(1)
Calculating rotation
683(2)
Using rotation in a game
685(7)
Driving a car
692(4)
Killer Bee Pandemonium
696(7)
Making Button Fairy
697(1)
Making Killer Bee chase the mouse
698(4)
Using a timer to fire bullets
702(1)
Putting together the finished game
702(1)
Using drag and drop for canvas
703(10)
Selecting draggable sprites
704(1)
Calculating the mouse's velocity
705(3)
The drag-and-drop code listing
708(5)
Combining a touch interface and the mouse in one program
713(1)
Where do you go next?
714(6)
What you should know about JavaScript and HTML5
714(3)
JavaScript frameworks and APIs
717(1)
Saving game data and files
718(1)
Multiplayer games
719(1)
Games for mobile devices, tablets, and the desktop
719(1)
Summary 720(1)
Index 721
Rex van der Spuy is a video game designer and writer. He s written Foundation Game Design with Flash, Advanced Game Design with Flash and Foundation Game Design with AS3.0. Rex has designed games and done interactive interface programming Agency Interactive (Dallas), Scottish Power (Edinburgh), DC Interact (London), Draught Associates (London), and the Bank of Montreal (Canada). He also builds game engines and interactive interfaces for museum installations for PixelProject (Cape Town). In addition, he created and taught advanced courses in game design for the Canadian School of India (Bangalore, India). When not writing about games, making them, or playing them, he amuses himself by building experimental, autonomous, self-aware, multi-cellular parallel universes out of shoe boxes, scotch tape, spare milk bottle caps and bits of string . He claims, that this is a lot more entertaining than you might think, but we re skeptical.