You are previewing Make a 2D Arcade Game in a Weekend: With Unity.
O'Reilly logo
Make a 2D Arcade Game in a Weekend: With Unity

Book Description

Create and complete your first 2D arcade game in Unity. In Make a 2D Arcade Game in a Weekend with Unity, you will learn to create an arcade classic brick breaker game from beginning to end. You will plan the game flow, add the graphics and create the game logic using C#, then build the UX to complete your game. By the time you have finished, you will have enough knowledge to tweak the game to create more levels or your own variant game rules, and you will have the confidence to go on and create your own 2D arcade games. You will also learn how to publish the game into mobile app stores.Unity is a powerful cross platform software tool that allows you to create 2D and 3D apps and games. Learning how to create a classic arcade game is a great way to learn the foundations of game design. While you do need to have a basic understanding of Unity to complete this project, advanced game building or advanced Unity experience is not required.

Table of Contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents at a Glance
  5. Contents
  6. About the Author
  7. About the Technical Reviewer
  8. Acknowledgments
  9. Introduction
  10. Chapter 1 : Getting Started
    1. Prerequisites
    2. Install Unity
      1. Choosing a License
      2. Welcome to Unity
      3. Configuring Unity
    3. Skinning the Interface
      1. Learning the Views
      2. Understanding Layouts
    4. Development Tips and Tricks
      1. Changing Runtime Background Color
      2. Useful Hotkeys
    5. Summary
  11. Chapter 2 : Define Game Layout and Environment
    1. 2D Game Design Setup
    2. Laying Out the Game
    3. Importing Assets
    4. Define Screen Resolution
    5. Adding Background
    6. Adjusting Our Camera
    7. Adding Bricks
      1. Creating PreFabs
      2. Creating Row of Bricks
      3. Add the Paddle
    8. Add the Ball
    9. Summary
  12. Chapter 3 : Create Positioning and Movement
    1. Making Our Ball Move
    2. Handling Ball Collisions
    3. Making Our Ball Bounce
    4. Beginning Scripting
      1. The Rules of C Sharp (C#)
      2. Selecting an Editor
      3. Our First Script
      4. Moving the Paddle with the Mouse
      5. Launching the Ball with the Mouse
      6. Destroy the Blocks on Hit
    5. Summary
  13. Chapter 4 : Scripting a Game Manager
    1. Keeping Our Ball in the Game Space
    2. Creating Invisible Collider Walls
    3. Changing the Impact of Gravity
    4. Relabeling the Game Objects in Our Scene
    5. Scripting Our Game Manager
    6. Scripting Our Lose Collider
    7. Using UI Text to Display Information
    8. Summary
  14. Chapter 5 : Adding Sound and Music
    1. Adding Background Music
    2. Adding Start and End Sounds
    3. Bricks with Action and Impact Sound
    4. Game Area Sounds for the Walls and Paddle
    5. Summary
  15. Chapter 6 : Game Power-Ups
    1. Building Power-Up Scripts
    2. Building Base Power-Up Prefab Scripts
    3. Extra Balls Script
    4. Change Paddle Size Script
    5. Creating Prefab Game Objects for Ball and Paddle Changes
      1. Sprites for Prefabs
      2. Extra Ball Prefab
      3. Shrink and Grow Prefabs
    6. Putting it All Together in the Scene
    7. Modify the Lose Script
    8. Summary
  16. Chapter 7 : Level Manager and Menu
    1. Creating Intro Scene
      1. Add a Main Title and Buttons
    2. Script for Loading a Level
    3. Modifying the Game Lose Scenario
      1. Add Restart and Main Menu Buttons
      2. Add a Panel for the Buttons
      3. Updating the GameManager and Lose Scripts
    4. Rename and Duplicate Main Scene
    5. Modifying Level 1 to Include Level Manager
    6. Adding Scenes to the Build Settings
    7. Add Additional Buttons
    8. Background Music
    9. Trailing Ball Effect
    10. Summary
  17. Chapter 8 : Publishing to the App Store
    1. Investigating Deployment Options
    2. Defining Build Settings
      1. Adding a Quit Button
      2. Button Creation and LevelLoader Script Modification
    3. Deploying to WebGL
    4. Unity Cloud Build
      1. Placing Our Game in GitHub
      2. Adding your GitHub to the Cloud
    5. Summary
  18. Index