Getting Started¶
The Appwrite SDK for Godot automatically intializes itself using values from .env. You can also set them at runtime using the set_endpoint(), set_project() and set_self_signed() methods.
Refer to Configuration guide for detailed information on how to configure the SDK.
Requirements¶
- Godot 4.x
- An Appwrite Cloud or self-hosted Appwrite server
Installation¶
- Open the Asset Store
- Appwrite SDK
- Download and extract the zip.
- Copy the addon and .env.example to root of your project.
- Enable the plugin from Project -> Project Settings -> Plugins.
Create an Appwrite Project¶
- Sign in to your Appwrite Console.
- Create a new project(or open an existing one).
- Add a platform for you game.
- If you support HTML5 export also, choose Web.
- Else choose appropriate platform for your game.
- Copy the Endpoint URL and Project ID from API info section.
Configure the SDK¶
Configure the SDK using either of the following methods:
* Recommended: Create a .env file at root containing you Appwrite configuration.
* Alternative: Set the values at runtime.
Refer to Configuration guide for detailed information on how to configure the SDK.
Verify You Connection¶
- Create a new scene.
- Attach a script to the root node.
- Add the following code:
extends Node
func _ready():
var result = await Appwrite.ping()
if result is AppwriteException:
push_error(result.message)
return
print("Successfully connected to Appwrite!")
print(result)
- Run the scene.
If the SDK is configured correctly, the request will success and you'll receive a response from you Appwrite server, confirming that your Godot Project is connected successfully.