# Tide Engine > Documentation for Tide's language, deterministic simulation, multiplayer and presentation. Source revision: 36904d8e07dd044bd665de823e6b8022ed4f4248 (modified working tree). Documentation SHA-256: ea38a553efadfaf8a016c33e947825b8c4d3d2005abcf32eb4f4a64094909e97. Website source checkout; not matched to an installed Tide release. Check tide version and the project toolchain. Start with [Using Tide with AI](https://tide-engine.dev/guide/ai.md) and the [quick reference](https://tide-engine.dev/guide/ai-context.md). ## Get started - [Introduction](https://tide-engine.dev/guide.md): Learn how Tide Engine combines deterministic multiplayer, an ECS and its own language to build games for desktop, Android and the web. - [Install](https://tide-engine.dev/guide/install.md): Install the tide command on Windows, Linux or macOS, with built-in clang for native and web games, and learn how to update it. - [Editor setup](https://tide-engine.dev/tools/editors.md): Set up Tide in VS Code, JetBrains, Emacs, Vim or Neovim with highlighting and language server support. - [Your first game](https://tide-engine.dev/guide/first-game.md): Build your first Tide game with components, systems, input and drawing, then host a multiplayer match and invite another player. - [Using Tide with AI](https://tide-engine.dev/guide/ai.md): Give your AI coding agent a Tide overview, persistent project instructions and an optional portable skill, with downloadable Markdown documentation. - [Quick reference](https://tide-engine.dev/guide/ai-context.md): Tide on one page: a complete game, the essential rules of the language and engine, and links to each topic's full reference. - [Playground](https://tide-engine.dev/guide/playground.md): Edit a running Tide game in your browser. Compile real Tide code locally and hot reload while keeping the game's state. - [Samples](https://tide-engine.dev/guide/samples.md): Play Tide Engine sample games in your browser, from falling sand and arena combat to 2D and 3D physics, and invite friends to a room. - [Earth demo](https://tide-engine.dev/guide/earth.md): Explore a shared little planet in Tide Engine: walk, drive, visit towns and inspect the live performance stats. - [Benchmarks](https://tide-engine.dev/benchmarks.md): Measured ECS performance for Tide and other ECS implementations, with workload details, methodology, variation and the limits of each comparison. ## Simulation - [Components and entities](https://tide-engine.dev/game/entities.md): Define components, entities and singletons in Tide's ECS, then spawn, add, remove and destroy data to build your game's world. - [Systems](https://tide-engine.dev/game/systems.md): Write Tide ECS systems that query entities each tick, declare data access and control execution order in a deterministic simulation. - [The schedule](https://tide-engine.dev/game/schedule.md): Read Tide's system schedule and see how the compiler uses data dependencies to run ECS systems across threads without changing results. - [Events](https://tide-engine.dev/game/events.md): Send and handle Tide events in the match and local presentation, with predicted and verified handlers that work through rollback. - [Commands](https://tide-engine.dev/game/commands.md): Send player actions to a Tide multiplayer match with commands, validate their payloads and control delivery, ticks and ordering channels. - [Assets](https://tide-engine.dev/game/assets.md): Import images, audio and glTF, FBX or OBJ models as Tide assets. See supported formats and their limits, then load files or fetch URLs while the game runs. - [Build code](https://tide-engine.dev/game/build-code.md): Make and process Tide assets and constants with code that runs while the game builds: outline an image, bake a curve, generate a mesh, its levels of detail or a sound. - [Scenes](https://tide-engine.dev/game/scenes.md): Author rooted scenes and prefabs, choose a startup scene, load and unload levels, and manage scene ownership and multiple instances. - [State visibility](https://tide-engine.dev/game/visibility.md): Control Tide client state with scene, entity and whole-component visibility, shared audience groups, partial simulation and local availability events. - [Endless worlds](https://tide-engine.dev/game/endless-worlds.md): Build an endless world of blocks in Tide: chunks as entities with grids, each player sent only the chunks near them, dimensions as scenes, the server's store for what nobody is near, read off the tick's thread and listed by prefix, chunk faces meshed across their edges, and far ground drawn from the seed with far regions of what players built. - [Async and tasks](https://tide-engine.dev/game/tasks.md): Write Tide async functions and tasks that wait for time, ticks, frames or other async calls, in the match or local presentation. - [Input](https://tide-engine.dev/game/input.md): Sample keyboard, mouse, touch and gamepad devices into Tide player input, then predict, sanitize and share it across the multiplayer match. ## Presentation - [Views and drawing](https://tide-engine.dev/game/views.md): Draw a Tide game with views: the camera, shapes, colors, text and the screen's pixels, motion that's smooth between ticks, and a frame's length. - [Views and the match](https://tide-engine.dev/game/views-and-the-match.md): What a Tide view reads of the match: other entities through a query, this machine's player's own with ownership filters, and what the server has confirmed with verified. - [Draw settings](https://tide-engine.dev/game/draw-settings.md): Tide's draw settings: blending, alpha, tints, stencil, transforms and clipping, each around a block or set for the draws that follow, and how to draw what's see-through. - [Meshes and textures](https://tide-engine.dev/game/meshes-and-textures.md): Draw triangles in Tide with Draw.Mesh, and texture them from an asset, a render target or a grid you paint: filters, wraps, mipmaps, one-channel textures and sampling said once. - [Drawing in 3D](https://tide-engine.dev/game/3d.md): Draw 3D in Tide: meshes through a 3D camera, cube, sphere, cylinder and plane primitives, depth for what is solid or see-through, which side of a triangle draws, and big scenes. - [Skinned meshes and animation](https://tide-engine.dev/game/animation.md): Import skinned glTF or FBX models, sample, retarget and blend deterministic poses, use bone sockets, and draw animated characters in Tide. - [Cameras and coordinates](https://tide-engine.dev/game/cameras.md): Cameras in Tide views: screen and world coordinates and rays for picking, locking the cursor to look around, a projection of your own, and reading a camera back as matrices. - [Render targets](https://tide-engine.dev/game/render-targets.md): Render targets in Tide: draw into an image, bring it to the window through a frag for post-processing, and pick its format, its samples for smooth edges, several colors and its depth. - [Frags and verts](https://tide-engine.dev/game/shaders.md): Write Tide frag and vert shaders and compute kernels for the GPU, with textures, per-draw values, instancing, GPU lists, shadow maps and multiple render outputs. - [Audio](https://tide-engine.dev/game/audio.md): Import WAV, Ogg Vorbis, MP3 and FLAC audio in Tide, control spatial sound and buses, and create audio filters while keeping sound local to each machine. - [Local state](https://tide-engine.dev/game/local-state.md): Keep Tide menus, settings, particles and connection status in local state, separate from the deterministic match and its rollback. - [Files and directories](https://tide-engine.dev/game/files.md): Read and write local files in Tide, use persistent save and temporary cache paths, and fetch URL bytes from views, handlers or tasks. - [GUI](https://tide-engine.dev/game/gui.md): Build Tide menus and controls with immediate mode GUI widgets, layouts, themes, modals, keyboard navigation and gamepad input. - [Good-looking UI](https://tide-engine.dev/game/ui-style.md): Style Tide menus with a Material-inspired example: tonal surfaces, pill buttons, subtle state layers, themed settings and animated feedback. ## Packages - [Overview](https://tide-engine.dev/packages.md): Find Tide's optional rendering, particles, geometry, visibility, physics, multiplayer menu, Steam and voice packages, and docs for git or local packages. - [Using and writing packages](https://tide-engine.dev/packages/using-and-writing.md): Add and update Tide packages from git or local folders, pin commits and share game code and C libraries through tide.packages. - [Render2D](https://tide-engine.dev/packages/render2d.md): Light elevated 2D sprites with normal maps, directional/point/spot lights, cutout shadows, Radiance Cascades and bloom. - [Render3D](https://tide-engine.dev/packages/render3d.md): Render static and skinned meshes with PBR materials, shared vertex deformation, shadows, sorted transparency, bloom and custom HDR effects. - [Corner Culling](https://tide-engine.dev/packages/cornerculling.md): Use conservative CPU box occlusion queries to drive game-owned per-player visibility, with cached candidates and native/WebAssembly support. - [Geometry](https://tide-engine.dev/packages/geometry.md): Build meshes in Tide code with the Geometry package: boxes, spheres, planes and other shapes, normals and tangents, welding, merging and bounds. - [Particles](https://tide-engine.dev/packages/particles.md): Create particle effects in Tide code with bounded emitters, custom spawn and update functions, and instanced 2D sprites or 3D billboards. - [Box2D](https://tide-engine.dev/packages/box2d.md): Use Tide's Box2D package for deterministic 2D rigid bodies, collisions, queries and multiplayer physics that survives rollback and joins. - [Box3D](https://tide-engine.dev/packages/box3d.md): Use Tide's Box3D package for deterministic 3D rigid bodies, collisions, compound shapes and world queries in multiplayer matches. - [Rooms](https://tide-engine.dev/packages/rooms.md): Add the bundled Rooms package to a Tide game for Play, Host and Join menus, room codes and invite links, volume settings and customizable pages. - [Lobby](https://tide-engine.dev/packages/lobby.md): Add lobbies and a quick match to a Tide game with the lobby package: a menu, ready flags, lobby data, and slots for another service such as Steam. - [Steam](https://tide-engine.dev/packages/steam.md): Ship a Tide game's lobbies and matches on Steam with the steam package: Steam identity, Steam lobbies, quick match and Steam's own networking, picked per build. - [Voice chat](https://tide-engine.dev/packages/voice.md): Add optional Opus voice chat to Tide sessions, with noise suppression, custom audio effects, receive volume and per-player mute. ## Multiplayer - [Matches](https://tide-engine.dev/multiplayer/matches.md): Start, host and join Tide matches, share room codes and manage sessions with one server-based path for single-player and multiplayer. - [Managed hosting](https://tide-engine.dev/multiplayer/hosting.md): Build Tide games locally, upload client and server artifacts, and manage isolated matches with prepaid credit. - [Shards](https://tide-engine.dev/multiplayer/shards.md): Split one Tide match world across servers by position, for worlds bigger than one server holds, without changing the game's code. - [Your own network and service](https://tide-engine.dev/multiplayer/own-network.md): Bring your own match transport and your own lobby service to a Tide game, from the game's own Tide and C files, with no change to the engine. - [Networking](https://tide-engine.dev/multiplayer/networking.md): Understand Tide's server-authoritative rollback netcode, client prediction, input delivery, corrections and host migration. - [Determinism](https://tide-engine.dev/multiplayer/determinism.md): Learn how Tide keeps ordinary float simulations bit-identical across desktop and web, with deterministic math, execution and state. ## Language - [Basics](https://tide-engine.dev/language/basics.md): Learn Tide language syntax, types, variables, operators and control flow, plus enums, attributes and settings for your game. - [Structs and functions](https://tide-engine.dev/language/functions.md): Define Tide value structs, methods and functions, with named arguments, defaults, overloads, out parameters, pure and cached functions, actions and operators. - [Generic functions](https://tide-engine.dev/language/generics.md): Write Tide functions that work for many types: type parameters, inferred or written type arguments, and has tests for the fields a type has. - [Errors](https://tide-engine.dev/language/errors.md): Handle Tide errors as values with fails, fail and try, and use optional values to represent data that may be missing. - [Math](https://tide-engine.dev/language/math.md): Use Tide's deterministic vector, matrix and quaternion math, with noise, random generators and seeds shared by the match. - [Text and lists](https://tide-engine.dev/language/text-and-lists.md): Work with Tide strings, lists, arrays, maps and sets as values, including text formatting, sorting and parallel element loops. - [JSON](https://tide-engine.dev/language/json.md): Read and write JSON in Tide as your own structs with Json.Read and Json.Write, the same on every machine, with no dynamic values. - [Grids](https://tide-engine.dev/language/grids.md): Store 2D and 3D cell data with Tide's Grid2 and Grid3, access cells by position and process grids in ordered or parallel loops. - [Namespaces and files](https://tide-engine.dev/language/namespaces.md): Organize Tide games across files and namespaces, control declaration names and compile code for engine versions or custom symbols. - [Virtual and override](https://tide-engine.dev/language/overrides.md): Customize Tide games and packages with virtual declarations and overrides, replacing systems and rules for variants and mods. ## Tools - [The tide command](https://tide-engine.dev/tools/cli.md): Use the tide command to run and build native, web and Android games, hot reload code, manage packages and capture scripted headless runs. - [Tide Motion](https://tide-engine.dev/tools/motion.md): Generate animations and clip transitions offline with Tide Motion, batch model work and import the resulting GLB animations into Tide. - [Debugging](https://tide-engine.dev/tools/debugging.md): Debug Tide code in Visual Studio, VS Code, CLion and LLDB: breakpoints in .tide files, stepping line by line, and lists, maps, text and entities shown as Tide's, in Unity or a game tide runs. - [Debug views](https://tide-engine.dev/tools/debug-views.md): Capture structured profiling reports or use Tide's in-game profiler to inspect game and engine costs, source locations and draw culling work. - [Dev tools](https://tide-engine.dev/tools/dev-tools.md): Mark a game's own tools, cheats and panels 'dev': they're in what tide run builds and left out of what players get, and the key under Escape opens a menu of the dev views. - [Usage data](https://tide-engine.dev/tools/telemetry.md): What anonymous usage data the tide command sends, every field of it, where it goes, how long it's kept, and how to turn it off. ## C - [Calling C](https://tide-engine.dev/c/functions.md): Call C and C++ from Tide through extern functions, pass values across the boundary and integrate native libraries and ECS systems. - [C hosts](https://tide-engine.dev/c/hosts.md): Integrate Tide games into CMake and custom C hosts, use the generated game API and drive simulation and presentation without a window. - [A game's own network](https://tide-engine.dev/c/network.md): The C interface for a Tide game's own match network: tide_network, the transports it makes, addresses, host migration and what a custom host calls. ## Reference - [Language spec](https://tide-engine.dev/spec.md): The Tide language reference: syntax, types, ECS components and systems, deterministic simulation, multiplayer, drawing and runtime APIs. ## Optional - [Offline documentation bundle](https://tide-engine.dev/llms-full.txt): all user pages, without the language spec. - [Bundle including the spec](https://tide-engine.dev/llms-full-with-spec.txt): retains Decided, Provisional and Open sections; proposals are not implemented promises. - [Tide skill ZIP](https://tide-engine.dev/ai/tide-skill.zip): optional skill and generated short overview.