Introduction
Tide is a game engine built for multiplayer first. Its simulation is deterministic: given the same inputs and commands, it gives the same results on every machine, down to the last bit of every float. Players on desktop, Android and the web share one world, with their inputs and commands driving it.
Games are written in Tide, a language of its own, built around an ECS. It compiles to C, and the C to native code or WebAssembly, together with the engine, so calls between your code and the engine's cost nothing.
Early days
Tide is young, and its language changes freely until 1.0. The language spec says which parts are decided and which are still provisional.
The big ideas
A game is data and systems. Entities are made of components, which are plain data. Systems are code that runs every tick, once for each entity that has the components it asks for. Singletons hold what there's one of per world, like the score or the rules.
component Health
{
int value = 100;
}
component Poisoned { }
system Poison(mut Health health, with Poisoned)
{
health.value -= 1;
}Systems say what they touch. mut means a system writes a component, and a plain parameter means it only reads it. with and without pick entities without reading anything. From that, the compiler plans which systems can run at the same time and which have to wait, and shows you why (see the schedule).
Everything is a match. The simulation, called the match, is what every machine runs the same way. It runs on a server, and even single-player is a match on a server this machine runs itself. The engine has rollback netcode built in: clients predict ahead and correct themselves when the server disagrees. See Matches.
Local state is everything else. Menus, settings, particles and the camera belong to one machine and are never sent. Views read the match and draw it once per frame, and they can change local state but never the match. The compiler enforces that boundary, so a view can't break the simulation by accident.
Players act through inputs and commands. Movement and held buttons reach the match as input, sampled once per tick and sent over the network. One-off actions, like choosing a team or sending a chat message, use commands, which the server puts into a tick. Both enter the simulation through match code; views draw the result.
A tick and a frame
The match advances in fixed ticks, 60 per second by default:
- Systems run, in a fixed order that's the same on every machine.
- Structural changes (spawning, adding and removing components, destroying) and events apply at the end of the tick, in the order they were made.
The screen updates every frame, as fast as the display allows:
- Views run, drawing the match blended between its last two ticks, so motion is smooth at any tick rate.
- The GUI draws over the world.
Where to go next
- Install tide, then make your first game.
- Give an AI coding agent the Tide overview, starter prompt and optional skill.
- Edit and hot reload a running game in the Playground.
- Read what a game is made of, a topic at a time, starting with components and entities.
- See how machines share a match, and how the engine keeps them in step: matches, networking and determinism.
- Find optional physics, menus and Steam integration in Packages, with setup and API docs for each bundled package.
- Look things up in the language and the tide command.
- Browse the samples to play complete games in your browser, alone or with friends.