---
title: Graph playground
description: "Edit a Tide game made with graphs in your browser: a board of
  cards and frames of nodes, checked by Tide's language server as you edit,
  compiled and hot reloaded into the running game."
source_url: https://tide-engine.dev/guide/graph-playground
source_file: docs/guide/graph-playground.md
source_revision: d46b7bc81b49e31e268bd62d158c040ec1c9ff21
source_worktree: modified
documentation_sha256: cff5cc1f43e9cab7c438614cde0e25d6b097b0171d16e0bfbecd7198624f4f9d
documentation_scope: Website source checkout; not matched to an installed Tide
  release. Check tide version and the project toolchain.
---

<a id="graph-playground"></a>

# Graph playground

This game is made with graphs only: a [visual scripting](https://tide-engine.dev/tools/visual-scripting.md) file, `game.tidegraph`,
with no text code. Change its board, and the running game picks up the change. Everything runs in your
browser, as in the [text playground](https://tide-engine.dev/guide/playground.md): nothing is installed and your graph is not sent anywhere.



<a id="try-a-change"></a>

## Try a change

The board opens on `Fall`, the system that moves every star down and checks whether the basket caught it. Its
data is in the cards on the left: drag with the right button, or click one in **My game**, to see them.

- On the card `FALL`, change `90` to `200`: the stars fall faster.
- On `WIDTH`, change `40` to `80`: the basket is twice as wide.
- On `GOLD`, click the colour and pick another: the stars change colour.
- In `Fall`, find the node **Set caught**, with a Get of `score` wired to its Target, `+=` and `1`. The `1` is what a catch
  counts: make it `10`.

The score and the stars carry over. **Restart** starts the last successful build from the beginning, and
**Reset graph** brings back the original graph and starts it again. Your graph is kept in this browser, so it's
still here when you come back.

**Auto reload** builds the graph a moment after each change. With it off, press **▶ Play**. If the graph has a
problem, it's marked on what it's about, the chip at the top right counts it, and the last successful game keeps
running.

<a id="the-board"></a>

## The board

This is the graph editor of the [editor extensions](https://tide-engine.dev/tools/editors.md), checked by the same language server:

- **Cards** are the game's data: a row for each field, with its name, its type and its value, each changed where
  it is. **Frames** are its code: nodes, starting from the entry on the left, which says when the code runs and
  what it takes.
- What never changes is in a node's input: a number is typed there, a constant or a type's name picked. A variable
  is a Get node, as in Blueprint (`star`, then its `position`, wired in), whose pin goes to any number of inputs.
  Click an input to choose what goes in it from a list of what fits; what's worked out (a **Multiply**, a call)
  is a node of its own, wired in.
- **+ Add**, or a right click on an empty part of the board, adds a card or a frame. A right click inside a frame
  adds a node, and a wire dragged from a pin and dropped in the frame offers what can go there.
- Anything moves by dragging it, a name is renamed by a double click, and a right click on anything opens the same
  menu: what it can have added, **Rename**, the clipboard and **Delete**, and a note. **Details**, on the right,
  has what's selected and its options.
- A type is picked from a list, never typed. A problem is on the row, input or node it's about, with what to do
  about it, and goes when it's fixed.
- **My game** and **Find…** go to a declaration. The board's "…" menu has **View as Tide**, which shows the
  whole file as text and opens it in the text playground.

[Visual scripting](https://tide-engine.dev/tools/visual-scripting.md) describes the board in full. Drag the divider between
the graph and the game to give either more room, or press **Expand** to fill the window.

<a id="what-runs-here"></a>

## What runs here

The graph is compiled as any Tide file is: tidec reads the `.tidegraph` as the Tide it stands for, then the game is
compiled to WebAssembly and loaded into the running preview. As in the text playground, the first build downloads
about 25 MiB of compiler tools, and the language server is a separate download of a few MiB, so the graph is checked
before the first build.

To make a game with graphs, [install Tide](https://tide-engine.dev/guide/install.md): graphs are edited in Unity, VS Code and JetBrains IDEs, and
`tide graph` turns any `.tide` file into one.
