Unity
If you've built games with Unity, there are some key differences you'll need to know to get started on All Out!
If you're coming from Unity, you'll feel at home with entities + components, a hierarchy, an inspector, and reusable prefabs. The biggest mindset shift is that All Out games are multiplayer-first: normal gameplay runs on the predicting client and authoritative server, while the engine syncs supported state for you.
TL;DR: What’s different vs Unity
Multiplayer is the default: you generally do not write RPCs, SyncVars, or Netcode spawning logic.
Write one gameplay path: don't guard normal gameplay with
Game.is_server()or you'll disable prediction.Be intentional about player UI:
Draw a player's gameplay UI from that player's
ao_late_updateinsideis_local_or_server().Use
is_local()only for player-specific visual overrides.
Avoid global singleton state: multiple players connect to the same session. Prefer storing state on the player or on world components.
All Out gameplay is 2D: position and scale use
v2, while rotation is one angle in degrees.Mobile-first: avoid keyboard-only assumptions unless your game explicitly targets PC.
Concept mapping (Unity → All Out)
Scene
Scene (world)
GameObject
Entity
Transform
2D entity transform (position/rotation/scale)
Component / MonoBehaviour
Component (CSL class deriving from Component)
Prefab
Prefab asset (created in-editor)
Hierarchy window
Inspector window
Instantiate(prefab)
Scene.instantiate(prefab_asset)
Start() / Update()
ao_start / ao_update(dt) lifecycle
Project layout: where “scripts” and “assets” live
Scripts: Your game code lives in
.cslfiles. New projects start with amain.cslthat imports the engine and defines lifecycle entry points. See Getting Started with CSL.Assets: Game assets live under your project’s
/resdirectory and are referenced by path without the/resprefix (example:"ui/button.png"). See Assets and Resources.
Imports (important difference)
In Unity, each C# script is compiled and can use its own using directives. In All Out, keep imports centralized:
Import
"core:ao"inmain.cslIf you add a folder (like
ui/), import the folder once inmain.cslAvoid adding imports in other files
Example:
Lifecycle: MonoBehaviour → CSL
In Unity you typically attach a MonoBehaviour to a GameObject and implement:
Start()/Awake()Update()/LateUpdate()OnDestroy()
In CSL, you’ll commonly use:
Global procs in
main.csl(for game-level setup)Component lifecycle methods on your components
Example component:
Global lifecycle procs run in each participating scene simulation; they are not server-only. Late-joining clients may receive a component whose start lifecycle already ran, so rebuild presentation from synchronized state in ao_on_state_sync when needed. See Game/Frame Lifecycle.
Prefabs: Unity Prefabs → All Out Prefabs
All Out prefabs are created in the editor and can be reused or spawned at runtime.
Create: see Prefabs
Spawn at runtime:
Linked instances preserve root properties, but component-field changes inside an instance are not independent overrides. See Prefabs.
“Serialized fields” (Inspector-exposed variables)
Unity uses [SerializeField] and public fields to expose values in the Inspector. In CSL, use @ao_serialize to expose a field to the editor.
Then add your component to an entity in the Inspector and tweak values per entity.
Spawning and querying: Instantiate/Find → Scene APIs
Unity patterns:
new GameObject()/Instantiate()FindObjectOfType<T>(),GetComponentsInChildren<T>()
All Out patterns:
Collision & triggers
An enabled collider with is_trigger set can call on_trigger_start, on_trigger_stay, and on_trigger_end. Each callback receives the trigger collider and the other collider. A Movement_Agent is not required.
CSL does not expose a general solid-contact callback equivalent to OnCollisionEnter. Use a trigger for enter/exit behavior. For broad sensing, query nearby components:
See Navmesh & Collision.
Multiplayer mindset: inputs, UI, and “where code runs”
In Unity you can often assume “my client owns my character”. In All Out, write gameplay once for the shared predicted path:
Gameplay input/UI: draw it from the player in
ao_late_updateinsideis_local_or_server().Player-specific visual overrides: use
is_local().
Common Unity-to-All-Out gotchas
Singleton managers: prefer per-player or per-entity state instead of global
GameManagerstyle singletons.Import habits: import engine and folders from
main.csl(don’t scatter imports across many files).Server guards: don't wrap normal gameplay in
Game.is_server().3D transforms: decide how the design maps into a 2D scene and use renderer layers for draw order.
Assuming singleplayer: always think “what happens with 10 players connected?”
Hardcoded desktop input: avoid requiring keyboard/mouse unless intentional.
Where to go next
Last updated