Skip to content

Godot Examples

In this section of the documentation we provide a series of tutorials on the C# examples for the Godot engine and distributed as a dedicated package on the SmartFoxServer 3 download page. The examples have been developed in Godot Mono 4.6, but the concepts and the code to interact with the SFS3 API are valid for any version of Godot 4 and beyond.

Each tutorial examines a single example, describing its objectives, offering an insight into the SmartFoxServer features it wants to highlight and providing the direct link to download the source code. This includes all the assets required to compile and test the example (both client and — if existing — server side). If necessary, code excerpts are provided in the tutorial itself, in order to better explain the approach that was followed to implement a specific feature. At the bottom of the tutorial, additional resources are linked if available.

The tutorials have an increasing complexity, from basic server connection to full realtime games with authoritative server Extension.

Specifically, the examples show:

  1. Basic connection with optional protocol encryption
  2. Room management
  3. Buddy list management
  4. Game Rooms and match-making
  5. Authoritative server in a turn-based game
  6. Clients synchronization in realtime games
  7. Audio streaming for in-game voice chat

Requirements

Unless otherwise noted inside the tutorials:

  • all examples are distributed as a single package and the same download link is provided in all the tutorials;
  • all examples have been developed in Godot Engine .Net 4.6 and distributed as Godot projects: import a project in the Godot's Project List and launch it;
  • the server side Extensions of those examples which feature one have been developed in Eclipse, but you should be able to use any Java IDE of your choice, provided you use Java 21 or higher.
  • all the examples make use of the latest version of the SmartFoxServer 3 C# API available at the time of their release; as the API evolves over time (bug fixes, new features), we strongly recommend that, after installing an example, you overwrite the included API DLL files with those provided in the latest SmartFoxServer C# API package available on our website.