Graph playground
This game is made with graphs only: a visual scripting 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: nothing is installed and your graph is not sent anywhere.
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, change90to200: the stars fall faster. - On
WIDTH, change40to80: 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 ofscorewired to its Target,+=and1. The1is what a catch counts: make it10.
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.
The board
This is the graph editor of the editor extensions, 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 itsposition, 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 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.
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: graphs are edited in Unity, VS Code and JetBrains IDEs, and
tide graph turns any .tide file into one.