Guide for Unity Unreal Godot
Unity

Unity guide

Multiplayer where the server decides every outcome, with nothing to set up. Local mode starts a server on your computer when you press Play. Each feature is a component you drop in.

SDK not public yet com.khalm.nulltick  ·  Unity 6  ·  new Input System

The Unity SDK isn't public yet. It's in early access: tell us what you're building and we'll get it to you. Your free account at app.nulltick.com holds the App ID and keys you'll need to go live. Everything on this page is what the SDK does today.

Quickstart

Press Play and you're multiplayer

Fastest start: open Tools > NullTick > NullTick Hub. Its Setup tab checks the plugin, creates a config, adds a connection and a player to your scene, and starts the server on your computer. Each step ticks itself off from what is really in your project.

The same thing by hand, from the GameObject > NullTick menu:

  1. Networked Player. Drops in a player that WASD moves, Space jumps and Left Ctrl crouches, with a camera that follows it. It also adds a NullTick Connection if the scene has none. The connection's defaults are already right: Local, 127.0.0.1:9999, room 1, Connect On Start.

  2. Other Players. Shows everyone else in the room, each with a character that follows them, and removes them when they leave. Without it you only see yourself.

  3. Walls. Add a NullTick World Collision component anywhere in the scene. It sends your scene's colliders to the server, so nobody walks through them.

  4. Press Play. The server on your computer starts by itself, and what you see is what the server decided, not a guess on your side.

For finished scenes to explore, import the demos (below).

#1 gotcha: Input System. NullTick reads the new Input System only. In Project Settings > Player > Active Input Handling, pick Input System Package (or Both). If you don't, the keyboard and mouse do nothing.

Local mode runs on Windows and Linux. The package carries the local server for both. On a Mac there is no local server yet, so you need a server you can reach on the network (see Going live).

Install

Add the package

Once you have early access, add the package in Unity's Window > Package Manager > + > Add package from git URL with this address:

https://github.com/notnullai/nulltick-unity-sdk.git

The address only works for an account we've given access to. The package brings its own local server, so Local mode works the moment you press Play.

To update, press Update in the Package Manager. Don't add the package a second time, and don't put a version on the end of that address. The plain address always gives you the current release; a version on the end freezes you on one that never updates.

Git URLs need git installed. Without it Unity reports "no git executable was found". Install git, restart Unity, and the address works.

Needs Unity 6 (6000.0 or later) and the Input System package, which Unity installs with it.

Who decides

The server decides every outcome

A player's game never decides what happens. It only asks: "I want to go that way", "I attack that one", "I throw, that way", "I pick that up". The server checks each request against what it holds itself (where everyone is, which way they face, what is in the way) and decides the result: where everyone ends up, what is hit, how much health it takes, where a thrown thing lands.

That is why a modified game can't move itself, run faster, hit from across the map, heal itself or pick who a blast hurts. There is nothing on the wire for it to forge. Every player sees the same result, because there is only one place it is decided.

Player

Controllers, movement & facing

You don't write networking code for movement. A player is these components, all under Add Component > NullTick (the Networked Player menu item adds them for you):

  • NullTick Player Controller reads keyboard, mouse and gamepad and tells the server where the player wants to go. Its Style dropdown: First-person, Third-person, Top-down (mouse aim), Click to move, Top-down (hack & slash), or None (turn-based / your own input).
  • NullTick Movement Sync moves the object to where the server says it is.
  • NullTick Rotation Sync turns it to the facing the server agreed.
  • NullTick Jump and NullTick Crouch. The controller adds a jump by itself if you didn't.

The controller never moves your camera. The Networked Player menu item adds an example follow camera you can keep, replace with Cinemachine, or delete.

A player standing still sends nothing but an occasional keepalive.

Stats

Every stat is a server value

Move speed, jump height, mass, throw strength, damage: each one is a value the server owns. You set where it starts on the component it belongs to (the Player Controller's Move Speed, NullTick Jump's height, a weapon's Damage, a vehicle's Mass). After that only the server changes it, and every player gets the same value. No player's game can write it, its own included.

  • NullTick Rule (Shop, Reward, Gather, Plant) is how a value changes: a speed pad, a shop, a pickup. The server checks the rule, then changes the stat for a while or for good.
  • NullTick Server Number (Gold, Hunger, Energy) gives every player a number the server keeps, with a start, a low and high limit, and a rate it drains or refills at.
  • NullTick Stat Display (Speed, Jump, Damage) shows a player their own stats as the server holds them, and calls out each change on screen. Or wire the values into your own UI.

Collision

Walls, layers & mass

NullTick World Collision collects the solid colliders in your scene when you connect and sends them to the server, which then stops and slides everyone along them. Nothing to set up: the sizes come from your character and the scene.

Collision layers are Unity's own. A networked object is on its GameObject's layer, and it collides with the layers your Layer Collision Matrix (Project Settings > Physics) says. If you never touched the matrix, everything collides with everything.

Players, vehicles, crates, platforms and thrown things all collide by one rule: their shape, their layers and how they move, whatever they are doing. A heavier body pushes a lighter one, players included.

Physics

Forces, carry, throw & projectiles

Each of these is a component you drop in. The server decides all of it.

  • NullTick Throwable is a grenade, a bow and arrow, or a cannon: pick one and every number is set for it. A number key puts it in the player's hand. The server flies it through your walls and floors, lets arrows stick where they hit, sets off blasts (a wall stops a blast), and takes the health itself.
  • Carry and throw. Tick Can Be Carried on a NullTick Vehicle (a crate is one) and players pick it up and drop it with F, and throw it with the fire button.
  • Forces. Blasts, a car's hit and a NullTick Rule's push (a trampoline, a bumper, a launch pad) push bodies by their mass, and a hard enough push throws a player.
  • NullTick Authority (Server-Decided Damage) is a weapon that hits what the player aims at: damage, range and the wait between attacks. It also holds everyone's health. Add one for blasts and hits to hurt anyone.
  • NullTick Vehicle is a car, a boat or a pushed crate, and NullTick Moving Platform a lift or a ferry. Both come ready-made from GameObject > NullTick.

Multiplayer

See a second player

Save your scene, then use Tools > NullTick > Two Players > Build and Launch Player 2. It builds the open scene as a Windows game and starts it, and it joins the same local server and room as the editor. Press Play in the editor to be the other player. After the first build, Launch Player 2 Again (no rebuild) is faster.

Two different computers can't use Local, because the local server only answers your own computer. They need a server both can reach (see Going live).

Demos

Try the demos

Two small finished games come with the package. They're optional, and nothing else needs them:

  • Playground: walk, jump, push and throw crates, drive the car, bow, cannon and grenades. The server decides every hit, push and throw.
  • Tic-Tac-Toe: turn-based, with no movement at all.

Run Tools > NullTick > Import the demo games…, or pick Demo games under Samples in the Package Manager. They land in Assets/Samples/, and NullTick then offers to build their scenes: say yes and one opens ready to press Play. The scenes are built rather than shipped so they always match the components you have. Open or rebuild one later from Tools > NullTick Demos. To undo the import, delete the imported folder.

Rooms

Rooms & lobby

Rooms are who sees whom: a match, a lobby, a shard. One server runs many rooms. Join, create and list them through the connection, or from the Hub's Rooms tab:

C#
connection.JoinRoom(42);       // join room 42 (it exists once someone is in it)
connection.CreateRoom();       // join the lowest room number nobody is using
connection.RequestRoomList();  // the answer arrives on connection.OnRoomList

Everyone in a room sees everyone else in it. Leave every player on the same room number for one shared world.

Messages

Chat & reliable events

Besides movement, NullTick has a reliable channel for chat and one-off game events. Messages arrive in order, even when packets drop.

C#
connection.SendChat("gg");                        // to everyone in the room
connection.OnChat += (from, text) => Debug.Log(text);
connection.SendEvent(channel, payload, length);    // your own event; arrives on connection.OnEvent

Rule of thumb: a value that lasts (health, gold) is a server value. A moment (a death, an item granted, a muzzle flash) is an event, not an object.

Network variables

Your own server values

Health, the stats above and Server Numbers need no code. For values of your own, declare them once and every player tracks the server's value. A value that doesn't change sends nothing.

  1. Declare a schema. Assets > Create > NullTick > Var Schema: one row per value, with a name, a kind (a number, a whole number, true/false, a choice, a vector or a list) and a step (the smallest change worth sending).

  2. Bind it. Add a NullTick Vars Binder next to the connection and assign the schema. Wire each value to a slider, a text or an animator in the Inspector, or read binder.Value("gold") from a script.

  3. Only the server writes them. Players can't cheat these values. Changing one takes code on the server, so for a first game, start with the no-code values above.

Spawned objects

Pets, mounts & things players make

Anything a player creates while playing that lasts and moves is a networked object everyone sees:

  1. Mark the prefab with NullTick Network Object and give it an Archetype number.

  2. Register it in an Assets > Create > NullTick > Object Registry (number to prefab) and assign that on your connection.

  3. Spawn it by instantiating the prefab (or Spawn() / Despawn()). Tick Follow Owner for a pet that trails its player. GameObject > NullTick > Pet and Mount make one ready to go.

Projectiles that should hurt are a NullTick Throwable (above), so the server decides the hit. One-off effects (hit sparks, a muzzle flash) are events, not objects.

Editor tools

NullTick Hub

Tools > NullTick > NullTick Hub is the one editor window. Setup gets a scene playing and links your project to an online server. Server starts and stops the server on your computer and shows its log, with live traffic under Advanced. Rooms lists and creates rooms. Objects makes the networked things a game is built from (a player, a vehicle, a pet) and shows what the scene already has. Variables shows the values that travel with each player, like health and gold.

Also under Tools > NullTick: Local Server (start or stop it on its own), Show Server Messages in the Console, Two Players, and Export Collision World….

Production

Going live

You can't provision a managed server yet. Managed online hosting isn't available, so there is nothing for Live to point at unless you run a host yourself. Local mode works today — the bundled host starts on Play — and that is where testing belongs for now. (Our own showcases, like CapTown in the demos, run on hosts we operate.)

When managed hosting lands, going online is the Hub's Setup tab: choose Online and paste the one-time code from app.nulltick.com. It fills in the address, App ID and key for you, with no secrets to copy by hand.

Walls on an online server come from a file. A server on the internet won't take walls sent by a player's game, or anyone could redraw the world. Use Tools > NullTick > Export Collision World… and start that server with the file.

Advanced

ECS / DOTS

An optional Entities module (it needs com.unity.entities) runs NullTick's core inside your game for DOTS entities. It doesn't connect to a server, so for multiplayer use the components on this page.