Testnet is now LIVE at testnet.spacetimedb.com! NOTE: This is a testnet, and all data will be wiped periodically.

1.0 RC3

Login

Unity Tutorial - Overview

Need help with the tutorial or CLI commands? Join our Discord server!

In this tutorial you'll learn how to build a small-scoped MMORPG in Unity, from scratch, using SpacetimeDB. Although, the game we're going to build is small in scope, it'll scale to hundreds of players and will help you get acquanted with all the features and best practices of SpacetimeDB, while building a fun little game.

By the end, you should have a basic understanding of what SpacetimeDB offers for developers making multiplayer games.

The game is inspired by agar.io, but SpacetimeDB themed with some fun twists. If you're not familiar agar.io, it's a web game in which you and hundreds of other players compete to cultivate mass to become the largest cell in the Petri dish.

Our game, called Blackhol.io, will be similar but with space themes in twists. It should give you a great idea of the types of games you can develop with SpacetimeDB.

This tutorial assumes that you have a basic understanding of the Unity Editor, using a command line terminal and coding. We'll give you some CLI commands to execute. If you are using Windows, we recommend using Git Bash or PowerShell. For Mac, we recommend Terminal.

The SpacetimeDB Unity SDK minimum supported Unity version is 2021.2 as the SDK requires C# 9. This tutorial has been tested with the following Unity versions.

  • 2022.3.32f1 LTS
  • 6000.0.33f1

Please file an issue here if you encounter an issue with a specific Unity version.

Blackhol.io Tutorial - Basic Multiplayer

Get started with the core client-server setup. For part 2, you may choose your server module preference of Rust or C#:

Blackhol.io Tutorial - Advanced

If you already have a good understanding of the SpacetimeDB client and server, check out our completed tutorial project!

https://github.com/ClockworkLabs/Blackholio

Edit On Github