Introduction

Cubzh is an all-in-one application for players and game creators (artists, developers).

This documentation contains everything you need to know as a developer to create your own realtime multiplayer games. πŸ‘Ύ

Cubes

In Cubzh, everything is made out of cubes. Terrain, avatars, items, vehicles... everything!

Mainly because it's quick and easy to create game assets with cubes:

Also because shapes made of 3D aligned cubes makes a pretty good standard for cross-game compatibility: πŸ™‚

Scripting language

The scripting language we use in Cubzh is Lua.

Lua is very solid and lighweight scripting language, it's been around since 1993. It's easy to learn and already used by other popular video game platforms like Roblox or Core.

A default Lua script is generated when you create a new game. You can launch the game in debug mode and select Edit code in the pause menu to see it.

Don't worry if you've never used it. You'll be able to define custom things for your games in minutes. ☺️

(Cubzh uses Lua version 5.3)

Quick example: How to jump higher?

Find where Client.Action1 is defined in the default script:

-- function triggered when pressing the Action1 button
Client.Action1 = function()
    -- Player represents the local player ingame avatar.
    -- Test if Player is on ground before changing velocity,
    -- otherwise, player could jump while in the air. :D
    if Player.IsOnGround then
        Player.Velocity.Y = 50
    end
end

Edit this line:

Player.Velocity.Y = 200 -- changed the value to jump higher

Use "Publish" button

The game will restart for all connected players (including yourself), everyone will now jump higher. πŸ™‚

πŸ’‘ Script comments start with --. Comments are not considered when running the script, they're only notes for developers.

Uppercase variables

The case of the first letter of a variable or function name has special meaning in Cubzh.

Basically, if it starts with an uppercase character, it means it's a built-in variable, exposed by the platform. It also means you'll find it defined somewhere in the reference. Think about it when you read through open source code. πŸ€“

As a consequence, you can't use names starting with uppercase letters for your own functions and variables.

Realtime multiplayer environment

Games in Cubzh are realtime multiplayer games by default.

It means you don't need a single line of code to make that work. It also means you don't have to worry about servers.

Also, there's always a debug server running as you work on your game. Your friends or random players can join and test things while you write code.

At any time, you can publish a new version of your game. Game servers are spinned up automatically based on player demand.

Truly cross-platform

No one should be left aside!

Cubzh runs on Android, iOS, Mac & Windows. (Linux + web browsers coming next)

While the game is cross-platform, we don't want developers to worry about making sure the game works fine on each one of them.

For example: a game designed on a desktop computer should be just as playable on mobile (and vice versa).

The scripting environment has been designed with that philosophy in mind.

UI elements, inputs, everything will adapt automagically depending on the screen and touch, mouse and/or keyboard events.

Get started

Ready to create your first game? πŸ™‚

➑️ Developer Guides

✏️ Edit this page