-
What is a Game?
- Extremely hard to define
- "all games share four defining traits: a goal, rules, a feedback system, and voluntary participation." - Jane McGonigal
-
What is Game Development?
-
Simple Answer: To process to build a game
-
Real Answer: A huge collaborative effort under taken by (potentially many) talented people involving many disciplines to create a polished and fun experience for a player to enjoy
-
Incomplete List of Required Skills in Game Development:
- Team Management (Producer)
- Marketing / Distribution (Publisher)
- Customer Validation (Market Research)
- Quality Control (Testers)
- Programming (Programmers)
- Graphic Design (Artists)
- Animation (Animators)
- Textures (Artists)
- Sound Engineering (Sound Engineers / Musicians)
- Game Design / Level Design (Designers)
- Gameplay Testing (Testers / Designers)
-
-
Game Engines
- What is a Game Engine?
A piece of software designed to assist with the creation and development of video games
-
What comes with a Game Engine?
- The Game Logic
- Main Game Loop
- Menus
- Scripting
- Object Instantiation / Pooling
- Garbage Collection
- Graphics / Rendering
- Cameras
- Shaders
- Textures
- Materials
- Lighting
- Animations
- Controls
- Keyboard / Mouse
- Controllers
- Networked inputs
- Audio
- BGM
- SFX
- 3D Audio Effects
- Physics
- Colliders / Bounding Boxes
- Raycasts
- Physics Materials
- Gravity
- Fluid Dynamics
- Explosions!
- AI
- Navigation (Navmeshes)
- Triggers
- Areas of Influence
- Scene Management
- Level Building
- Level Loading
- Scene Serialization
- VR/AR Support
- Head-tracking support
- Motion controls
- HUD Menus
- The Game Logic
-
What are some Game Engines?
- Unity3D
- Super popular
- Plenty of tutorials and resources
- Scripted in C#, JavaScript, or Boo
- Unreal
- Super popular
- Plenty of tutorials and resources
- Scripted in Blueprints and/or C++
- CryEngine
- Highly performant
- Typically the bleeding edge of technology
- Scripted in C#, C++, and Lua
- OGRE
- Extremely minimal
- Highly customizable
- Scripted in C++
- Unity3D
-
Case Study: Flappy Bird
- 2013 Mobile Hit
- Game Definition
- Goal
- Survive as long as possible
- Get a high score
- Rules
- You can't hit the floor
- You can't hit the pipes
- You're always falling
- Feedback System
- Your inputs direct the bird
- If directed well, you can get a higher score
- Voluntary Participation
- We have a short attention span
- We get bored easily
- Goal
-
Unity3D
-
Terminology
-
GameObject
An object in the game that's governed by a script
-
Transform
An object that exists within the "world" of the game
-
Component
An additional piece of functionality that has been added to a game object
-
-
Interface
- Hierarchy
- Parents and Children
- Scene
- World Space vs Local Space
- Game
- Inspector
- Layers
- Tags
- Transform
- Components
- Project
- Console
- Controls
- Scene Management
- Play
- Pause
- Next Frame
- Hand Movement
- Transform Movement
- Transform Rotation
- Transform Scaling
- Scene Management
- Hierarchy
-
- Set the Scene
- Create a scene
- Introduce the camera
- Set the aspect ratio
- Add in a background
- Import the image
- Create an empty game object
- Add a sprite renderer
- Apply the sprite
- Tweak the scaling (2.0f, 1.5f, 1.0f)
- Add in the Character
- Create the character
- Import the image
- Create an empty game object
- Add the sprite renderer
- Apply the sprite
- That's a big bird!
- Adjust the camera (Orthographic 9)
- Adjust the bird scaling (0.25, 0.25, 1.0f)
- Time for gravity
- Add a Rigidbody2D to the bird
- Falls kinda slow? Increase it's mass (5, 500, 1000000)?
- What falls faster? 1lb of lead or 1lb of wood?
- Time to increase gravity scaling (2)
- Time to learn how to jump
- Add a BirdController.cs script
- Add an Update loop for input
- Add a FixedUpdate for input to change the velocity
- Set the force to be 5
- Tweak until it feels good (600)
- Create the character
- We've made a "flappy" bird!
- Build our pipes
- Create a pipe
- Create an empty game object
- Import our pipe pieces
- Align to (0.0f, 0.0f, 0.0f)
- Scale them all to (5.0f, 5.0f, 1.0f)
- Cascade 6 pieces downwards, snapping with ctrl key
- Store in "Resources/Prefabs" as a prefab
- Add a BoxCollider2D
- Size (3.0f, 16.0f)
- Offset (0.0f, -6.0f)
- Place the pipe below the bird
- Does it collide?
- Add a BoxCollider2D to the bird
- Now the collide!
- Combine 2 pipes into an "obstacle"
- Rotate one pipe to (0.0f, 0.0f, 180.0f)
- Move it's "local space" to (0.0f, +/-5.0f, 0.0f)
- Combine under a new game object and store as a prefab
- Create a pipe
- Time for more pipes!
- Create a GameManager
- Create GameManager.cs
- Add Update loop
- Add in time management code
- Add in object instantiation code
- Add in transform.position assigment
- Test!
- We get obstacles, but they don't move?
- Add a script to the obstacles!
- Create PlatformMovement.cs
- Create PlatformMovement.cs
- Add Update loop
- Add transform.position movement code
- Play with the speed value to see what feels good (-4)
- Play with the GameManager wait time to feel better (3)
- Create a GameManager
- We've now got all our set pieces in place
- Time to add in our "rules"
- Add in collision logic to BirdController.cs
- Make it restart on collision
- Background overlaps? Move it to the back
- Now we have the basics of the "game"!
- Time to add in our more meaningful "goal"
- Add in a Canvas
- Find the Hierarchy window (middle-left)
- Click the create button (top-left corner of the Hierarchy window)
- Navigate and click UI -> Canvas
- Add an empty child to the Canvas
- Right click Canvas in the Hierarchy
- Create empty
- Add in a Text component
- Move it's anchors to the top-left (box below "Rect Transform")
- Set it's position offset from the corner (50.0f, -50.0f)
- Change it's text size to something better (25)
- Add in a Canvas
- Upgrade our Obstacle
- Pull the prefab back into the scene
- Add a new child game object with a BoxCollider2D to the right side of the gap between pipes
- Move the position (3.0f, 0.0f, 0.0f)
- Adjust the size (3.0f, 6.0f)
- Time to adjust their layers so we can distinguish what we hit
- Add "Score" and "Death" layers
- Assign the Score game object to the "Score" layer
- Assign the Pipe game objects to the "Death" layer
- Press apply on the Obstacle game object to update our prefab
- Update our BirdController script
- Add in layer checking logic to the collision event
- Add in a script for handling the score
- Create ScoreManager.cs
- Add ScoreManager component to Score game object
- Add public field ScoreManager to BirdController
- Link the two in Unity (drag Score from the hierarchy onto the ScoreManager field in the Bird game object)
- Oh snap, the bird gets blocked!
- Make the Score collider a "trigger"
- Go to the Score game object and tick the "Is Trigger"
- Make the Score collider a "trigger"
- It still doesn't work!!
- Move the Score check into OnTriggerEnter2D(Collider2D)
- Congrats, you've rebuilt flappy bird!
Tappy Plane Tutorial Background Art Bird Sprite Pipe Sprites