---
title: "Unit 2 - Basic Gameplay"
content_type: course
url: "https://learn.unity.com/course/unit-2-basic-gameplay?language=en"
language: en
difficulty: beginner
duration_minutes: 320
unity_version:
  - "6.0"
supported_unity_versions:
  - name: "6.0"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=6.0"
  - name: "2022.3"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2022.3"
  - name: "2021.3"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2021.3"
  - name: "2020.3"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2020.3"
  - name: "2020.2"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2020.2"
  - name: "2020.1"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2020.1"
  - name: "2019.4"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2019.4"
  - name: "2019.3"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2019.3"
  - name: "2019.2"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2019.2"
  - name: "2019.1"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2019.1"
  - name: "2018.4"
    url: "https://learn.unity.com/course/unit-2-basic-gameplay.md?language=en&version=2018.4"
last_updated: "2026-08-04T14:20:42.000Z"
---

# Unit 2 - Basic Gameplay

In this Unit, you will program a top-down game with the objective of throwing food to hungry animals - who are stampeding towards you - before they can run past you. In order to do this, you will become much more familiar with some of the most important programming and Unity concepts, including if-then statements, random value generation, arrays, collision detection, prefabs, and instantiation. In completing this Unit, you will learn how to program a basic game with the ability to launch projectiles and maneuver the player to keep the game alive.

## Contents

- [Unit 2 - Introduction](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/unit-2-introduction?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/unit-2-introduction.md?language=en&version=6.0))
- [Lesson 2.1 - Player Positioning](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-1-player-positioning?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-1-player-positioning.md?language=en&version=6.0)) — Create a new prototype project and script side-to-side player movement that stays within the play area using if-then logic.
- [Lesson 2.2 - Food Flight](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-2-food-flight?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-2-food-flight.md?language=en&version=6.0)) — Implement a projectile prefab launched with the spacebar and add boundaries that remove projectiles and animals leaving the game area.
- [Lesson 2.3 - Random Animal Stampede](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-3-random-animal-stampede?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-3-random-animal-stampede.md?language=en&version=6.0)) — Learn to script a spawner that creates random animal prefabs at the top of the screen when the user presses the S key.
- [Lesson 2.4 - Collision Decisions](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-4-collision-decisions?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lesson-2-4-collision-decisions.md?language=en&version=6.0)) — Implement timed animal spawning, collision-based destruction, and a Game Over state in your scene.
- [Challenge 2 - Play Fetch](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/challenge-2-play-fetch?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/challenge-2-play-fetch.md?language=en&version=6.0)) — Tackle a scripting challenge using arrays, random values, collisions, and spawning as a dog catches falling balls before they hit the ground.
- [Lab 2 - New Project with Primitives](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lab-2-new-project-with-primitives?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/tutorial/lab-2-new-project-with-primitives.md?language=en&version=6.0)) — Set up a new project using primitive objects and colored materials to block out your scene and frame the camera.
- [Quiz 2](https://learn.unity.com/course/unit-2-basic-gameplay/quiz/quiz-2-z8?language=en&version=6.0) ([md](https://learn.unity.com/course/unit-2-basic-gameplay/quiz/quiz-2-z8.md?language=en&version=6.0)) — Use this quiz to check your understanding of the skills and concepts presented in Unit 2.
