I chose to write up a tutorial on creating Flappy Bird as it acts as a good starting point for
someone interested in learning Unity and creates an immediately gratifying result without too much hassle. The overview of the
interface further cements this goalby giving readers the bare minimum information needed to get started.
Much of the difficulty in this project came from rephrasing terminology to cater to readers. As a fully-
featured game engine, Unity works on many of its own proprietary systems and thus decisions had to be made on which ones should be
explained and which ones should be glossed over. Minimizing jargon would be ideal, but concepts like GameObjects and Components are
too integral to be ignored.
A website was used for this module, as I figured people using Unity would be on a computer anyway. With a
website, readers could switch between their demo project and the instructional website fairly easily. Also, websites allow for some
interactive functionality (such as linking), though this wasn’t explored too much in this case. The website itself would be much
more accessible than a physical document as well.
The drafting process for the tutorial was fairly intuitive. I simply worked my way through how I would create
a Flappy Bird game, while avoiding any functionality that might be too nuanced for a beginner’s tutorial. As I worked, I took
frequent screenshots and documented my steps in the form of bullet points, which were then used to create the website.
Following user test day, I opted to section off the instructions more strongly, providing more structure to
the tutorial. Images and code blocks were better placed to break apart large sets of instructions, keeping things less monotonous.
The Unity editor is made up of various tabbed windows that can be rearranged as you see fit.
The most commonly used windows are covered below.
Every object in your Unity game is a GameObject. This includes characters, items, cameras, and more.
The hierarchy window shows the relationships between these GameObjects in a fashion similar to a file tree. An object indented beneath another object represents a parent-child relationship.
Every GameObject in Unity is positioned in 3D space. This applies to 2D games as well.
The scene view allows you to view and navigate this space, as well as edit any GameObjects within it.
GameObjects need components in order to function in a specific way.
The inspector window allows you to see and edit the components of the currently selected GameObject. Each component may have its own settings to edit.
The project window displays any files (such as images or scripts) that can be used in your project.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FlappyBirdController : MonoBehaviour {
float velocity = 0;
void Start() {
}
void Update() {
transform.position += Vector3.up * velocity;
velocity -= 0.005f;
if(Input.GetKeyDown(KeyCode.Space)) {
velocity = 0.15f;
}
}
}
public GameObject GameOverSprite;
void GameOver() {
Destroy(gameObject);
GameOverSprite.SetActive(true);
}
void Update() {
transform.position += Vector3.up * velocity;
velocity -= 0.005f;
if(Input.GetKeyDown(KeyCode.Space)) {
velocity = 0.15f;
}
if(transform.position.y < -5) {
GameOver();
}
}