Skip to main content

Server Logic

Game state the server owns and the code that changes it; every player sees each change. Start with what a Server Object is, then create a type, set who may read and call it, relate objects to each other, write its server logic and deploy it with Server Compute. Use it from Blueprint or from C++, fix what goes wrong with the troubleshooting page, read the Unreal and ck-exec names side by side, and follow the worked examples in Oakford. It also says how to move from the deprecated Game Models to Server Objects.

📄️Create a Server Object type

Describe a type of Server Object with a UCrowdyServerObjectDefinition data asset in its Blueprint-style editor (toolbar, Server Code tab, Server Object panel with its Variables and Functions, and a Details tab that follows the selection), variables, inputs and outputs added in the asset or taken from a struct, every setting on it and the platform term behind each, who can call each Server Function, the field types a Server Object can carry, and how to change a type without losing data.

📄️Access, members and timers

The settings that make the server enforce who may read a Server Object and who may call each Server Function (Readable By, Callable By, Cooldown, Value Range), give it members (Members From This Object or a Crowdy Team, Max Members, the Join, Leave, Add Member, Remove Member, Make Leader and Set Open for Joining functions, Open for Joining, the leader rules), run timers and player events, and let one type call another (Call other Server Objects), with what a refused player sees and the names logic.rs gets.

📄️Write its server logic

Generate a Server Object type's server code (a Rust crate) from its definition asset with Generate Server Code, the Server Code tab of the asset's editor, what each generated file holds, how to write your Server Functions in logic.rs or in a file of your own with Code Source, viewing, comparing and restoring what an earlier deploy sent, the revisions.json record to commit, what the generated code already does for you, regenerating after a change, and how to build and deploy the crate today.