You are previewing Flash Game Development by Example.
O'Reilly logo
Flash Game Development by Example

Book Description

Build 10 classic Flash games and learn game development along the way

  • Build 10 classic games in Flash. Learn the essential skills for Flash game development.

  • Start developing games straight away. Build your first game in the first chapter.

  • Fun and fast paced. Ideal for readers with no Flash or game programming experience.Topic

  • The most popular games in the world are built in Flash.

  • In Detail

    You can't call yourself a Flash game developer unless you know how to build certain essential games, and can quickly use the skills and techniques that make them up.

    Flash Game Development by Example is an ultra-fast paced game development course. Learn step-by-step how to build 10 classic games. Each game introduces new game development skills, techniques, and concepts. By the end of the book you will have built ten complete games – and have the skills you need to design and build your own game ideas.

    The book starts with simple well known puzzle games: Concentration and Minesweeper. After learning the basics of game design you’ll introduce AI with a four-in-a-row game. Then as you build your own versions of old arcade games such as Snake, Tetris, and Astro Panic. The book ends with a collection of modern casual classics.

    Build the classic and modern games that will turn you into a capable Flash games developer.

    Table of Contents

    1. Flash Game Development by Example
      1. Flash Game Development by Example
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      6. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      7. 1. Concentration
        1. Defining game design
        2. Setting stage size, frame rate, and background color
        3. Welcome to Concentration ("Hello World")
        4. Creating the tiles
        5. Adding randomness: shuffling the tiles
        6. Placing the tiles on stage
        7. Picking tiles
        8. Checking for matching tiles
        9. Making the player see what happened
        10. Preventing the player from cheating
        11. Fine-tuning the game: adding educational content
        12. Summary
        13. Where to go now
      8. 2. Minesweeper
        1. Defining game design
        2. Creating the empty field
        3. Placing the mines
        4. Adding the digits
        5. Optimization needed
        6. Placing tiles on stage
        7. Showing tile contents
        8. Auto showing adjacent empty tiles
        9. Flagging tiles
        10. Timer and game over
        11. No sudden death
        12. Summary
        13. Where to go now
      9. 3. Connect Four
        1. Defining game design
        2. The game field
        3. Showing smooth animations
        4. Splitting the code
        5. Adding the board
        6. Placing the board to stage
        7. Creating more classes
        8. Placing the disc
        9. Moving the disc
        10. Applying game rules
        11. Checking for possible columns
        12. It's raining discs
        13. Determining a cell value (if any)
        14. Making your move
        15. Waiting for the disc to be added to stage
        16. Checking for victory
        17. Animating discs
        18. The animation itself
        19. Making computer play
        20. Unleashing CPU power
        21. Playing with AI: defensive play
        22. Summary
        23. Where to go now
      10. 4. Snake
        1. Defining game design
        2. Array-based games versus Movie Clip-based games
        3. Preparing the field
        4. Drawing the graphics
        5. Placing the snake
        6. The snake itself
        7. Simplifying the code
        8. Letting the snake move
        9. Controlling the snake
        10. Placing fruits
        11. Eating fruits
        12. Making the snake grow
        13. Placing walls
        14. Making the snake die
        15. Summary
        16. Where to go now
      11. 5. Tetris
        1. Defining game design
        2. Importing classes and declaring first variables
        3. Drawing game field background
        4. Drawing a better game field background
        5. Creating the tetrominoes
        6. Placing your first tetromino
        7. Moving tetrominoes horizontally
        8. Moving tetrominoes down
        9. Managing tetrominoes landing
        10. Managing tetrominoes collisions
        11. Rotating tetrominoes
        12. Removing completed lines
        13. Managing remaining lines
        14. Making tetrominoes fall
        15. Checking for game over
        16. Showing NEXT tetromino
        17. Summary
        18. Where to go now
      12. 6. Astro-PANIC!
        1. Defining game design
        2. Creating the game and drawing the graphics
        3. Adding and controlling the spaceship
        4. Adding a glow filter
        5. Making spaceship fire
        6. Making the bullet fly
        7. Adding enemies
        8. Moving enemies
        9. Being killed by an enemy
        10. Killing an enemy
        11. Killing an enemy— for good
        12. Killing an enemy— with style
        13. Advancing levels
        14. Managing current score and high score
        15. Saving data on your local computer
        16. Summary
        17. Where to go now
      13. 7. Bejeweled
        1. Creating documents and objects
        2. Placing the gems
        3. Placing the gems for real
        4. Selecting a gem
        5. Preparing to swap gems
        6. Swapping gems
        7. Swapping gems for real
        8. Selecting which gems to remove
        9. Removing gems
        10. Making gems fall
        11. Adding new gems
        12. Dealing with combos
        13. Giving hints
        14. Summary
        15. Where to go now
      14. 8. Puzzle Bobble
        1. Creating documents and assets
        2. Placing and moving the cannon
        3. Drawing the game field
        4. Drawing the game field with alternate rows
        5. Drawing the game field according to Pythagoras
        6. Loading the cannon with a bubble
        7. Firing the bubble
        8. Letting bubble bounce and stop
        9. Adjusting bubble position and reloading
        10. Allowing bubbles to stack
        11. Detecting bubble chains
        12. Removing the chain
        13. Removing unlinked bubbles
        14. Summary
        15. Where to go now
      15. 9. BallBalance
        1. Creating files and assets
        2. Adding the balance
        3. Choosing where to drop spheres
        4. Dropping the spheres
        5. Stacking spheres
        6. Removing spheres
        7. Adjusting floating spheres
        8. Moving the balance
        9. Summary
        10. Where to go now
      16. A. Where to Go Now