← News

Visual scripting is now the default in Tallow 0.2

From v0.2.22-beta, visual scripts are the default way to write game code in Tallow ECS (the 0.2 series). New projects start with a graph instead of code, the Graph window sits beside the Scene view, and the graph editor has a new node menu, flow control, nodes that adapt to types, comment boxes and subgraphs. Beef isn’t going anywhere: it stays fully supported, and graphs and Beef scripts work together in the same project.

A new Tallow 0.2 project with the first-person character's visual script open in the Graph tab
A brand new project. The player is a visual script, with a comment box over each part.

What “default” means

  • New projects have no Beef code. An empty project starts through the editor’s own start-up class, so there is no Program.bf. Add one only if your game needs code to run before any scene loads.
  • The player is a graph. The first scene is a floor and a first-person character made as a visual script (Scripts/FirstPersonCharacter.tgraph). It walks, sprints, jumps, crouches and moves the camera, and every part is labelled with a comment box, so it doubles as a worked example.
  • The Graph window is part of the default layout. It is docked beside the Scene view and opens the project’s first visual script.
  • Visual scripts come first in the menus. Project > + lists Visual Script and Visual Subgraph first. Beef scripts are under Beef Script (code).

Existing projects open as they are. A project with its own Program.bf keeps starting from it, and Beef scripts build exactly as before.

Graphs are code underneath

When you save a graph, it is compiled into an ordinary Beef component next to it. So anything a graph does works the same as code: hot reload, the Inspector, prefabs and networking. There is no separate kind of project, and the two mix freely:

  • The public methods, properties and fields of your Beef scripts are nodes under My Scripts, and [GraphNode] static methods are nodes under Code.
  • Beef code can find a graph like any component (GetComponent<FirstPersonCharacter>()), read and set its variables, and call its Custom Events.
  • An Object variable in a graph can hold a Beef component, and a Beef field can hold a graph component.

Use whichever fits: graphs for gameplay you want to see and tweak, Beef for systems, heavy maths and anything you would rather type.

A better graph editor

The add-node menu with its node categories
Right-click the canvas for every node, by category.
  • The add-node menu sorts every node into nested categories: Add Event, Flow Control, Variables, Math, Utilities, Transformation, Game, Physics, Collision, Input, Audio and more. After the hand-made nodes, each category lists the engine classes that belong there, with a node for each public member. Type to search instead of browsing.
  • Flow control: Sequence, For Loop with Break, Do Once, Do N, Flip Flop, Gate, Delay, Retriggerable Delay, Switch on Int and Switch on String, Is Valid, and Custom Events with Call Custom Event. Exec inputs accept several links, and nodes such as Gate have Open, Close and Toggle inputs.
  • Input events: On Input Action Pressed/Released and On Key Pressed/Released.
  • Nodes that adapt to types. Place a plain Add, Multiply, Lerp, Equal, Split, Print String or Select and link a value into it, and it becomes the version for that type, like an overload in code. A vector and a float into Multiply makes Multiply (Vector * Float); a rotation and a vector makes Rotate Vector.
  • Every variable type: Boolean, Integer, Float, String, Vector 2D, Vector, Rotation, Color and Object references (a GameObject, a Transform or any component), each picked per object in the Inspector.
  • Comment boxes: press C, give it a title and colour, and dragging it moves everything inside.
  • Subgraphs: New Subgraph Here makes a reusable node in one click. Double-click it to open it, and < Back returns.
  • Easier wiring: a link under the mouse lights up, and right-click or Delete removes it. Dragging the end of a link off an input picks it up to move it.
  • Many new math, vector, rotation, interpolation, string, transform, physics trace, audio and debug draw nodes.
A pickup made as a visual script, with comment boxes for each part
The pickup from the new tutorial: spin, bob, and collect when the player gets close.

Crouch jumping in the starter character

The first-person graph crouches with Left Ctrl (or the pad’s East button). On the ground the head comes down. In the air the feet come up instead, so a crouch jump clears ledges your feet would otherwise catch on, and standing up in mid-air lowers the feet again rather than popping the camera up. Standing up is refused under low ceilings. The new Physics > Character nodes (Set Character Height, Character Height and Crouch Lift) do the work, so you can reuse them in your own characters. Mouse look in the template no longer needs the right mouse button held.

Learn it

The new tutorial, Your first visual script: a spinning pickup, builds a collectable from scratch in about 25 minutes, with a picture for each step. The visual scripting guide lists every category and node feature.

Get it

All of this is in Tallow ECS v0.2.24-beta, out now on the Downloads page. The standard 0.1 series doesn’t change. Every build is listed with its changes on the release notes page. Tell us how it goes in the forums.