Unity Game Development — Lesson 1: Create Your First Game

High school–friendly, step-by-step instructions to build a simple 2D scene with a movable player.

Objective

  1. Open and navigate the Unity Editor.
  2. Create a simple 2D scene.
  3. Add a Player object that moves with arrow keys or WASD.
  4. Understand GameObjects, Components, and Play Mode.

What You’ll Need

Vocabulary

Term Meaning
Scene A level or environment in your game.
GameObject Any item in your scene (player, wall, light, etc.).
Component Adds behavior or properties to a GameObject.
Transform Controls position, rotation, and scale.
Play Mode Lets you test your game in the Unity Editor.

Step-by-Step Instructions

Step 1 — Start a New Project

  1. Open Unity Hub.
  2. Click New Project → 2D (Core).
  3. Name it PX_lastname_UnityA and click Create project.

Step 2 — Set Up the Scene

  1. In the Hierarchy, right-click → 2D Object → Sprite → Square.
  2. Rename it to Player.
  3. In the Inspector, click the Color box and pick a color.

Step 3 — Add Movement with a Script

  1. In the Project window, right-click → Create → C# Script.
  2. Name it PlayerMovement.
  3. Double-click the script to open it in your code editor.
  4. Replace the contents with the code below and save.
// PlayerMovement.cs
using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
    public float speed = 5f;

    void Update()
    {
        float moveX = Input.GetAxis("Horizontal");
        float moveY = Input.GetAxis("Vertical");

        transform.Translate(new Vector2(moveX, moveY) * speed * Time.deltaTime);
    }
}
  1. Drag the PlayerMovement script onto the Player GameObject in the Hierarchy.

Step 4 — Test the Game

  1. Click the Play button at the top of Unity.
  2. Use Arrow keys or WASD to move the player square.
  3. Click Play again to stop testing.
Tip: If your player doesn’t move, confirm the script is attached to the Player object and check the Console for errors.

Challenge Extensions

Reflection Questions (Answer them in the private comments on google classroom.

  1. What is a GameObject in Unity?
  2. What does the Transform component control?
  3. Why is Update() called every frame?
  4. How does Time.deltaTime help movement feel smooth?

Submission

Submit 4 files:

Use these filenames:

Save the files into your google drives under your class period and upload to Google Classroom.