> For the complete documentation index, see [llms.txt](https://gilmour.online/compsci/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gilmour.online/compsci/3d-game-design/3-game-1-rolling-ball.md).

# Game 1: Rolling Ball

## Finished Game Overview

{% embed url="<https://youtu.be/QX6SmbqNhPs>" %}

##

## Building The Game

### 1. Building the Scene

{% embed url="<https://youtu.be/aUFb4-IrHJ8>" %}

### 2. Pickups: Scripts - Rotation.

{% embed url="<https://youtu.be/xfmmmYKMJHY>" %}

### 3: Player Movement: Part 1

{% embed url="<https://youtu.be/NUu-aT8CO2o>" %}

#### 3b: Player Movement: Part 2

{% embed url="<https://youtu.be/Uv3qHTC69_w>" %}

### 4: Camera Control and Extra Levels

{% embed url="<https://youtu.be/Y0eKiO4gssU>" %}

### 5: Switching Between Levels: Part 1

{% embed url="<https://youtu.be/haAiEjeZ6y8>" %}

#### 5b: Switching Between Levels: Part 2

{% embed url="<https://youtu.be/9kiDPrX7dn8>" %}

### 6: Text and User Interface Basics: Part 1

{% embed url="<https://youtu.be/X52O1PtrUdk>" %}

#### 6b: Text and User Interface Basics: Part 2

{% embed url="<https://youtu.be/ZEJDbwBFpoQ>" %}

#### 6c: Text and User Interface Basics: Part 3

{% embed url="<https://youtu.be/zjZ9Df8JV8A>" %}

## Assignment

For your assignment, you will need to build on the ball roller game in the following ways:

1. Create at least three extra levels (for a total of five).
2. Make your game say "You Win" when you beat the final level.
3. Different colored power up with different point value from the ones we built.
4. Stop the timer and disable game controls if the game is over. (Hint: You will need a boolean (bool) type variable to control whether the game has ended and link those to if - statements within your game)
5. Create an death box or script under your level that will restart your level if the player falls off our hits it. If you are creating a death box, you will need at box collider, but not necessarily a renderer or material You can create invisible collisions.
6. Make a sharable build of your game using the instructions below.

## Making a Sharable Build

{% embed url="<https://youtu.be/NQHByEru5vM>" %}

## Booleans

{% embed url="<https://youtu.be/d9L4oHA2yM4>" %}

## Learning Targets

* I can create and use int, float and bool variables.
* I can correctly change the value of a variable through code.
* I understand when to use public and private variables.
* I can access inputs and apply them to player movement.
* I can implement if statements in C#.
* I can write and call my own methods in C#
* I understand and correctly use Start, Update, FixedUpdate and LateUpdate functions.
* I can link components to variables.
* I can determine how many of a GameObject exist in a scene.
* I can organize and program based on my build index.
* I can change scenes within my game through code.
* I can create and manipulate several different 3D primatives.
* I understand and can use several different components.
* I can add text elements to the game screen.
* I understand when to add RigidBody components and when not to.
* I can use RigidBody components to interact with Unity’s physics system.
* I can create and apply materials to objects.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gilmour.online/compsci/3d-game-design/3-game-1-rolling-ball.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
