Real-World Flash Game Development

Book description

This book covers Flash for the everyday developer. The average Flash developer doesn't have luxurious timelines, employers who understand the value of reusability, or the help of an information architect to design a usable experience. This book helps bridge the gap for these coders who may be used to C++, Java, or C# and want to move over to Flash. Griffith covers real-world scenarios pulled from his own experiences developing games for over 8 years in the industry.

Gifts from Griffith's REAL-WORLD experiences include: Game design templates and pre-written scripts to automate tasks within Flash; Classes for handling common math computations used in gaming, so that game developers can see how to set up a simple game flow; Powerful debugging tools for your games(debuggers for Flash games are hard to come by, and this book provides them for you).

The associated web site offers: Code from the game examples in the book with fully build-able source files. Additional code snippets, classes, and utilities. Scripts for automating tedious and repetitive tasks within Flash. Template game-design documents for planning game proposals in the same manner outlined in the book. Links to other helpful online resources for both Flash and game development.

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents
  5. Acknowledgments
  6. Introduction
  7. Chapter 1 Computer Science Isn’t for Everyone
    1. A Little Groundwork
    2. Common Game Types
    3. General Development Terms
    4. Game-Specific Development Terms
    5. Flash Development Terms
    6. You Can Wake Back Up Now
  8. Chapter 2 The Best Tool for the Job
    1. Flash Back
    2. The Case For Flash
    3. Nobody’s Perfect
    4. Stop Fighting It
    5. Things Flash Was Built to Do
    6. The Best Tool for the Job
  9. Chapter 3 A Plan is Worth a Thousand Aspirin
    1. Step 1. Be Able to Describe the Game from a Bird’s-Eye View in One or Two Sentences
    2. Step 2. Outline or Wireframe Out the Flow of All of the Game’s Screens
    3. Step 3. With Your Description and Basic Wireframe in Hand, It’s Time to Outline the Core Mechanics That Your Game Will Utilize
    4. Step 4. Build an Asset List
    5. Step 5. Make a List of Technical Requirements for Your Game
    6. Step 6 (Optional). Diagram Your Classes Using a UML Modeler
    7. A Quick Review of the Planning Steps
  10. Chapter 4 //FTW!
    1. Fair Warning
    2. PART 1: Classes
    3. Packages
    4. Classes as Files
    5. Constructors
    6. Constants, Variables, and Methods
    7. Getter/Setter Methods
    8. Class Identifiers
    9. Inheritance and Polymorphism
    10. Interfaces
    11. Linking Classes to Assets in Flash
    12. Class vs. Base Class
    13. Using Exported Symbols with No Class File
    14. getDefinitionByName and Casting
    15. PART 2: Events
    16. dispatchEvent
    17. addEventListener, removeEventListener, and Event Phases
    18. Event Propagation and Cancellation
    19. Custom Events
    20. PART 3: Errors
    21. try, catch, finally
    22. Throwing Your Own Errors
    23. PART 4: Data Structures and Lists
    24. Objects
    25. Arrays
    26. Vectors
    27. Dictionaries
    28. ByteArrays
    29. So What Should I Use For My Lists?
    30. Custom Data Structures
    31. PART 5: Keep Your Comments to Everyone Else!
    32. The Bottom Line
    33. PART 6: Why Does Flash Do That?
    34. Event Flow
    35. Frame Scripts
    36. Working with Multiple SWF Files
    37. Garbage Collection
    38. Conclusion
  11. Chapter 5 Managing Your Assets/Working With Graphics
    1. A Few Words About Organization
    2. Working with Graphics
    3. Raster Formats to Use
    4. Key Points to Remember
  12. Chapter 6 Make It Move: Actionscript Animation
    1. A Little Terminology
    2. To Tween or Not to Tween? Is That a Question?
    3. A Simple Scripted Shooter
    4. Memory: Tweening Animation
    5. Summary
  13. Chapter 7 Turn It Up To 11: Working With Audio
    1. Formats to Use
    2. Export Settings to Use
    3. Using External Files
    4. Tools for Working with Sounds
    5. Scripting Sounds
  14. Chapter 8 Put the Video Back in “Video Game”
    1. Video Codecs
    2. External Video Uses: Cutscenes and Menus
    3. The CutsceneManager
    4. Video on the Timeline
    5. Setting Up an Internal Video
    6. Summary
  15. Chapter 9 XML and Dynamic Content
    1. Bringing Data In: Understanding the URLLoader Class
    2. XML
    3. E4X
    4. The Crossword Puzzle
    5. Content Is a Two-Way Street: A Crossword Builder
    6. Sending Data Back Out
    7. One More Example: XML vs. Flash Vars
    8. Summary
  16. Chapter 10 Four Letter Words: M-A-T-H
    1. The Math Class
    2. PART 1: Geometry and Trigonometry
    3. A Quick Explanation of Radians and Pi
    4. 3D in Flash
    5. The SimpleTunnelShooter Example
    6. PART 2: Physics
    7. Scalar
    8. Vector
    9. The Vector3D Class
    10. Displacement
    11. Velocity
    12. Acceleration
    13. Friction
    14. Inertia
    15. Simulation vs. Illusion
    16. Reality vs. Expectations
    17. Example: A Top-Down Driving Engine
    18. Example: Top-Down Driving Game with Drift
    19. Review
  17. Chapter 11 Don’t Hit Me!
    1. What You Can Do vs. What You Need
    2. hitTestObject—The Most Basic Detection
    3. hitTestPoint—One Step Up
    4. Radius/Distance Testing—Great for Circles
    5. Rect Testing
    6. When All Else Fails, Mix ‘n’ Match
  18. Chapter 12 I Always Wanted to Be An Architect
    1. OOP Concepts
    2. Practical OOP in Game Development
    3. The Singleton: A Good Document Pattern
    4. Summary
  19. Chapter 13 We’ve All Been There
    1. Basic Encapsulation—Classes and Containers
    2. Store Relevant Values in Variables and Constants
    3. Don’t Rely on Your Stage
    4. Don’t Use Frameworks or Patterns That You Don’t Understand or That Don’t Apply
    5. Know When It’s Okay to Phone It in and When It Definitely Isn’t
    6. Conclusion
  20. Chapter 14 MixUp—A Simple Engine
    1. The Main Document
    2. The MixUp Class
    3. The Title Class
    4. The RulesPanel Class
    5. The Game Class
    6. The Interfaces
    7. The GameBoard Class
    8. The SourceImageEmbedded Class
    9. The GameHistory and Results Classes
    10. The SourceImageCamera Class
    11. Review
  21. Chapter 15 Bringing It All Together: A Platformer
    1. The Platformer Genre
    2. Data Flow
    3. The Game Flow and Features
    4. The Level File Format and Asset Structure
    5. The Engine Classes
    6. The Game Class
    7. The Asset Classes
    8. Taking It Further
  22. Chapter 16 Don’t Play By Yourself: Multiplayer Development
    1. RTMFP
    2. Stratus
    3. MixUp Multiplayer
    4. Conclusion
  23. Chapter 17 Squash ‘Em If You’ve Got ‘Em: The Bug Hunt
    1. Bugs
    2. Performance/Optimization
    3. Summary
  24. Chapter 18 On Your Guard
    1. Malicious Use
    2. Data Protection
    3. SWF Protection
    4. Summary
  25. AFTERWORD
  26. APPENDIX A Webcams and Microphones
  27. INDEX
  28. ONLINE CONTENTS
    1. APPENDIX B Localization
    2. APPENDIX C JSFL is JavaScript For Lovers

Product information

  • Title: Real-World Flash Game Development
  • Author(s):
  • Release date: November 2012
  • Publisher(s): Focal Press
  • ISBN: 9781136137013