# Your first game, by hand

> From a blank project to a published game - a ball, walls, a goal line, a score and one rule.

A ball rolls into a goal and the score goes up. About ten minutes, by hand.

> [!TIP]
> An AI assistant can build this for you. See [Build with AI](/studio/building-with-ai).

## 1. Create a project

1. Open [studio.disko.ooo](https://studio.disko.ooo) and sign in.
2. Press **New project**, give it a name, and choose **Blank**: this guide
   builds everything itself.

## 2. Add the ball

![Placing a disc, then naming it Ball and giving it a speed in the Inspector.](/shots/first-game-ball.mp4)

1. Press **New scene** in the Project panel.
2. Pick the **Disc** tool and click in the scene.
3. In the Inspector, set:
   - **Name**: `Ball`
   - **Velocity** x: `4` (it rolls right)
   - **Damping**: `1` (it never slows down)

## 3. Draw walls and a goal

![Drawing a wall around the ball, then a goal line on the right named Goal.](/shots/first-game-walls.mp4)

1. Pick the **Wall** tool and click corner by corner, then the first corner
   again to close the wall.
2. Pick the **Line** tool and click two points on the right.
3. Select the line and name it `Goal`.

A line blocks nothing. It notices discs that cross it.

## 4. Keep score

![Making a score variable, then a row: when a disc crosses Goal, add 1 to score and put the ball back.](/shots/first-game-score.mp4)

1. Open **Variables** and press **New variable**. Name it `score`.
2. Open **Events** and press **New row**.
3. Choose the trigger _A disc crosses {line}_, and set **line** to `Goal`.
4. Press **Action**, choose _Add {n} to {variable}_: `1` to `score`.
5. Press **Action** again, choose _Move {disc} to {position}_: `Ball` to
   `0`, `0`, the middle of the scene.

The row reads: _When a disc crosses Goal, add 1 to score, move Ball to (0, 0)_.
Without the move, the ball bounces back over the line and scores again.

## 5. Play it

1. Press **Play**, then **Start match** in the bar above the game.
2. Open **Variables** and select `score`: it goes up by 1 each time the ball
   scores.
3. Press **Stop** to go back to editing.

## 6. Publish it

1. In the [Creator Portal](https://dev.disko.ooo), claim a namespace and
   create a game (once).
2. Press **Publish**, pick the game and its visibility, and confirm.

Anyone can now play it in a room. See [Publishing](/studio/publishing).

## Next

- Give each player a body: [Scenes and prefabs](/studio/scenes-and-prefabs).
- Add a menu and a scoreboard: [Menu and HUD](/studio/ui).
