;Foundation Game Design with Flash КНИГИ ;ДИЗАЙН и ГРАФИКА название : Foundation Game Design with Flashиздатель : friends of ED год: 2009 язык :English формат: pdf страниц : 608ISBN: 1430218215 размер : 4,34 мбWe've all sneaked the odd five minutes here or there playing the latest Flash game that someone sent round the office, but creating those games is trickier than it looks. The aim of Foundation Game Design with Flash is to take you, even if you've minimal multimedia or programming experience, through a series of step-by-step examples and detailed case studies to the point where you'll have the skills to independently design any conceivable 2D game using Flash and ActionScript. The book is a non-technical one-stop-shop for all the most important skills and techniques a beginner game designer needs to build games with Flash from scratch. Whether you're creating quick blasts of viral amusement, or more in-depth action or adventure titles, this book is for you.Focused and friendly introduction to designing games with Flash and ActionScript5 detailed case studies of Flash gamesEssential techniques for building games, with each chapter gently building on the skills of preceding chapters........ .com 85 CONTENTS 8 About the Author 16 About the Technical Reviewer 17 About the Cover Image Designer 18 Introduction 20 Chapter 1: Programming Foundations: How to Make a Video Game 25 Basics you need to have 26 Things you need to know 26 And the things you don't need to know 26 It's all about programming 27 Programming? But I'm terrible at math! 28 I already know how to program! 28 What kind of games can I make? 29 Learning some new terms 29 Laying the foundation 29 Files you'll need 30 Setting up the work environment 30 Setting up the Flash Developer workspace 32 Setting up the ActionScript code format preferences 32 Writing your first program 33 I'll take that to go! 33 Don't skip class! 34 Using the constructor method 36 Aligning code 38 What's your directive? 39 Importing and extending the MovieClip class 40 Adding comments to your code 43 Publishing the SWF file 44 It didn't work? 46 Project Panel 48 little more about AS3.0 and the Flash Player 49 A little more about AS3.0 and the Flash Player 49 Naming conventions 50 Summary 51 Chapter 2: Making Objects 53 Understanding Interactive Objects 54 Setting up the work environment 54 Creating the first page 57 Drawing the first page 60 Drawing the background 61 Organizing layers and the timeline 65 Drawing the foreground objects 67 Grouping objects 76 Adding some clouds 77 Creating some flowers 79 Learning a few more techniques 82 Creating a character 84 Adding some more pages 87 Using buttons 88 Creating a button symbol 89 Understanding button states 93 Creating the Over state 94 Creating the Down state 95 Duplicating the button 96 Organizing the Library 97 Adding the buttons to your scene 98 Summary 99 Chapter 3: Programming Objects 101 But I'm a bit scared of programming! 102 Displaying the first page of the storybook 102 How did that work? 104 Programming buttons 111 Using dot notation 111 Invoking methods 113 Understanding events and event listeners 120 Programming storybook buttons 126 Looking at the onHillButtonClick event handler 129 Using the onPondButtonClick event handler 130 Adding back buttons 130 Knowing when to use this model 133 Summary 134 Chapter 4: Controlling Movie Clip Objects 137 Movie Clip properties 138 Setting up the project files 140 Going up and down 140 Understanding x and y positions of objects 145 Moving incrementally 146 Making it bigger and smaller 155 Vanishing! 160 Having a look 164 Controlling Movie Clip timelines 170 Taking it further 184 Summary 185 Chapter 5: Decision Making 187 Setting up the project files 188 Designing a GUI 190 Inputting and outputting 191 Adding some text fields 192 Building a simple guessing game 198 Setting up the Main.as file 198 Learning more about variables 200 Making it more obvious 203 Making decisions 206 Displaying the game status 210 Winning and losing 219 Modular programming with methods 224 Polishing up 225 Tackling random numbers 226 Disabling the Guess button 230 Playing again? 231 Seeing the final code 234 Taking it farther 237 Tracking guesses 237 Adding a visual dis 237 Entering numbers with the Enter key 238 Turning the tables 240 Summary 241 Chapter 6: Controlling a Player Character 243 Setting up the project files 243 Controlling a player character with the keyboard 244 Controlling with the keyboard—the wrong way! 244 Controlling the keyboard—the right way! 252 Setting screen boundaries 260 Blocking movement at the stage edges 261 Building a better pigpen 263 Screen wrapping 267 Scrolling 268 Creating an environment 269 Fine-tuning the player character 271 Scrolling basics 273 Better scrolling 274 Even better scrolling 281 Taking it further 284 Parallax scrolling 284 Summary 285 Chapter 7: Bumping into Things 287 Setting up the project files 287 Ouch! 290 Using hitTestObject 290 Changing a dynamic text field 292 Triggering a change of state 293 Reducing a health meter 295 Updating a score 301 Picking up and dropping objects 307 Learning the bad news about hitTestObject 313 Detecting collisions with the bounding box 314 Learning to live with it 316 Creating subobjects 317 Using hitTestPoint 319 Using hitTestPoint to create an environmental boundary 323 Creating objects that block movement 327 Working with axis- based collision detection 330 Programming with the Collision class 331 Summary 343 Chapter 8: Object-Oriented Game Design 345 Introducing object- oriented programming 346 Binding classes to symbols 346 Using properties and methods 347 Private properties and methods 348 Communicating between classes using getters and setters 349 Getting started with the object- oriented approach 354 Case study: Dungeon Maze Adventure 355 Setting up the game 356 Gathering project files and objects 357 Entering the dungeon! 358 Laying out the level 359 The objects in the game 360 Animating with the timeline 362 Animating the object 364 Adding and removing objects from the stage 369 How Dungeon Maze Adventure works 373 DungeonOne_Manager class 374 Modifying the game 404 Adding a new level 404 Creating a game manager 407 Removing objects from the game 414 Summary 417 Chapter 9: Platform Game: Physics and Data Management 419 Natural motion using physics 420 Setting up the project files 420 Acceleration 421 Friction 430 Bouncing 432 Gravity 433 Jumping 436 Case study: Bug Catcher 441 Setting up the project files 442 Using the Player_Platform class 443 Adding Platforms 450 Detecting platform collisions 452 Using for loops 456 Looping through platforms 459 Finding the global x and y position of a subobject 461 Rotating toward an object 465 Rotating the frog's eyes toward the player object 468 Changing the stacking order 469 Adding some bugs to the code—literally! 472 Using arrays 479 Collecting bugs 486 Complete Main_BugCatcher class 492 New Collision.playerAndPlatform utility 496 playerAndPlatform method 496 Summary 504 Chapter 10: Advanced Object and Character Control 507 Dragging and dropping objects 508 Dragging and dropping the procedural way 508 Dragging and dropping the object- oriented way 516 An alternative to inheritance: Composition 521 Moving objects with the mouse 524 Fixing an object to the mouse's position 525 Adding a dynamic filter 527 Moving an object with easing 530 Following the mouse with a bit of delay 533 Easing—advanced 535 Properties and methods of the Tween class 537 Easing package classes and methods 540 Tween events 542 Easing to random positions and calculating velocity 544 Case study: Complex mouse- driven player control 550 Player.as 550 Moving the player 553 Rotating the wand 555 Firing bullets in 360 degrees 555 Bullet.as 558 Object factories 565 Product classes 566 Factory class 567 Client class 569 Enemy AI systems 570 Following the player 570 Running away from the player 574 Rotating and shooting toward the player 575 Using other player control systems 581 Dispatching events 582 Event "bubbling" 583 Case study: Space Shooter 585 Game structure 586 Creating bullets 587 Checking for bullet collisions with objects 588 Removing bullets at the stage boundaries 591 Classes and events 592 Summary 592 Index 595 A 595 B 596 C 596 D 597 E 598 F 599 G 600 H 600 I 600 J 601 K 601 L 601 M 601 N 602 O 603 P 603 Q 605 R 605 S 605 T 607 U 607 V 607 W 608 X 608 Y 608 Z 608
Weâve all sneaked the odd five minutes here or there playing the latest Flash game that someone sent round the office, but creating those games is trickier than it looks. The aim of Foundation Game Design with Flash is to take you, even if youâve minimal multimedia or programming experience, through a series of step-by-step examples and detailed case studies to the point where you'll have the skills to independently design any conceivable 2D game using Flash and ActionScript. The book is a non-technical one-stop-shop for all the most important skills and techniques a beginner game designer needs to build games with Flash from scratch. Whether you're creating quick blasts of viral amusement, or more in-depth action or adventure titles, this book is for you.
- Focused and friendly introduction to designing games with Flash and ActionScript
- Five detailed case studies of Flash games
- Essential techniques for building games, with each chapter gently building on the skills of preceding chapters
What youâll learn- Learn how to build interactive movies and objects with Flash
- Get a thorough grounding in ActionScript 3.0 and good programming practices, with minimal prior programming experience required
- Discover how to build interactive storybooks, space-shooter, adventure and drag-and-Drop games.
- Master collision detection, Enemy AI systems, player control, managing game data, basic physics and trigonometry.
- Make use of design patterns and object-oriented programming techniques to build robust games.
- Understand the strategies for making games fun to play and easy to build.
Who this book is forThis book is for a non-technical creative person who wants to learn the art of video game design, but has no idea where to start or where to look for help. It is a lucid, friendly and step-by-step guide though all the technical and creative issues involved in game design with Flash and ActionScript. The book treats the art of programming as a creative artistic tool, and will help anyone who may be afraid of programming to love the subject as much as the author does. The techniques in the book are comprehensive enough to form the basis of career as a game designer, and form a solid foundation for continued study of programming and ActionScript. This book is the missing link that will guide and inspire any curious and creative person turn a good game idea into a reality.
Table of Contents
- Programming Foundations: How to Make a Video Game
- Making Objects
- Programming Objects
- Controlling Movie Clip Objects
- Decision Making
- Controlling a Player Character
- Bumping into Things
- Object-Oriented Game Design
- Platform Game: Physics and Data Management
- Advanced Object and Character Control
We've all sneaked the odd five minutes here or there playing the latest Flash game that someone sent round the office, but creating those games is trickier than it looks. The aim of Foundation Game Design with Flash is to take you, even if you've minimal multimedia or programming experience, through a series of step-by-step examples and detailed case studies to the point where you'll have the skills to independently design any conceivable 2D game using Flash and ActionScript. The book is a non-technical one-stop-shop for all the most important skills and techniques a beginner game designer needs to build games with Flash from scratch. Whether you're creating quick blasts of viral amusement, or more in-depth action or adventure titles, this book is for you. Focused and friendly introduction to designing games with Flash and ActionScript Five detailed case studies of Flash games Essential techniques for building games, with each chapter gently building on the skills of preceding chapters If you've ever wondered how to make a video game and where to start, this is the place. Foundation Game Design with Flash is a friendly, step-by-step guide though all the technical and creative issues involved in game design with Adobe Flash CS3 and CS4 and ActionScript 3.0. This book treats the art of programming as a creative artistic tool and can help anyone who might be afraid of programming to conquer that fear and start to enjoy the creative possibilities that open up. Foundation Game Design with Flash takes you on a journey from building simple point-and-click games to creating professi "A friendly and comprehensive introduction to the design and object-oriented programming with Adobe Flash CS3 and CS4 and Actionscript 3.0. Covers platform, space-shooter, adventure, and logic games with detailed case studies. No previous game design or programming experience required"--Cover