import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Zap, Code2, Rocket, ExternalLink, CheckCircle2, AlertTriangle, Package } from "lucide-react";
import { CodeBlock } from "@/components/dev-platform/ui/CodeBlock";
export default function GodotIntegration() {
return (
Godot Engine Integration
Build with Godot Engine + AeThex
Integrate AeThex APIs with Godot 4's open-source game engine. Use GDScript or C# to build
cross-platform games with unified backend, authentication, leaderboards, and cloud saves.
{/* Quick Stats */}
2M+
Active Developers
Open Source
MIT Licensed
2D + 3D
Multi-Platform Export
{/* Features */}
What You Can Build
Cloud Save System
Save player progress to AeThex backend, sync across PC, mobile, web, and console builds
Multiplayer Backend
Use AeThex REST APIs with Godot's HTTPRequest node for matchmaking, lobbies, and player data
Cross-Platform Auth
Link Steam, Epic, or email accounts to AeThex Passport for unified player identity
Analytics & Events
Track player behavior, session analytics, and custom events with AeThex telemetry API
{/* Quick Start */}
Quick Start Guide
1. Install AeThex Godot Plugin
Add the AeThex GDScript plugin to your project
Download from the Godot Asset Library or install manually:
2. Initialize AeThex Client (GDScript)
Create an autoload singleton for global AeThex access
Add res://scripts/AeThexManager.gd as an autoload
in Project Settings → Autoload → Name: "AeThex"
3. Build Cloud Save System
Save and load player progress with one function call
void:
var result = await AeThex.aethex_client.users.update_data(
Global.current_user.id,
{
"level": player_data.level,
"gold": player_data.gold,
"inventory": player_data.inventory,
"position": {
"x": player_data.position.x,
"y": player_data.position.y
},
"timestamp": Time.get_unix_time_from_system()
}
)
if result.success:
print("Game saved to cloud!")
else:
print("Save failed: ", result.error)
# Load player progress from AeThex cloud
func load_game() -> Dictionary:
var result = await AeThex.aethex_client.users.get_data(
Global.current_user.id
)
if result.success:
print("Game loaded from cloud!")
return result.data
else:
print("Load failed, using default data")
return get_default_player_data()
func get_default_player_data() -> Dictionary:
return {
"level": 1,
"gold": 0,
"inventory": [],
"position": {"x": 0, "y": 0}
}
# Example: Auto-save every 5 minutes
func _ready():
var auto_save_timer = Timer.new()
auto_save_timer.wait_time = 300.0 # 5 minutes
auto_save_timer.autostart = true
auto_save_timer.connect("timeout", self, "auto_save")
add_child(auto_save_timer)
func auto_save():
save_game(Global.player_data)`}
language="gdscript"
showLineNumbers={true}
/>
{/* C# Examples */}
C# Integration (Godot 4 Mono)
Leaderboard System (C#)
Display global leaderboards with real-time updates
("/root/AeThex");
_leaderboardList = GetNode("LeaderboardList");
LoadLeaderboard();
}
private async void LoadLeaderboard()
{
try
{
var result = await _aethex.Leaderboards.GetTopAsync("global-score", new()
{
Limit = 100,
Platform = "all"
});
_leaderboardList.Clear();
foreach (var entry in result.Entries)
{
var text = $"{entry.Rank}. {entry.Username} - {entry.Score:N0} pts";
_leaderboardList.AddItem(text);
}
GD.Print($"Loaded {result.Entries.Count} leaderboard entries");
}
catch (System.Exception e)
{
GD.PrintErr($"Failed to load leaderboard: {e.Message}");
}
}
public async void SubmitScore(int score)
{
try
{
await _aethex.Leaderboards.UpdateScoreAsync("global-score", new()
{
UserId = GlobalData.CurrentUser.Id,
Score = score,
Metadata = new()
{
{ "platform", "godot" },
{ "version", ProjectSettings.GetSetting("application/config/version").AsString() }
}
});
GD.Print($"Score submitted: {score}");
LoadLeaderboard(); // Refresh
}
catch (System.Exception e)
{
GD.PrintErr($"Failed to submit score: {e.Message}");
}
}
}`}
language="csharp"
showLineNumbers={true}
/>
{/* Authentication Flow */}
Player Authentication
Multiple authentication methods: Email/password, Steam, Epic Games, or anonymous.
Email + Password Login
Steam Authentication (PC Builds)
Link Godot games on Steam with AeThex using the GodotSteam plugin.
{/* Best Practices */}
Best Practices & Tips
Godot-Specific Considerations
• Use await for async calls: Godot 4's await keyword makes HTTP requests clean
• HTTPRequest node: For manual API calls, use Godot's built-in HTTPRequest
• Export variables: Store API keys in environment variables, not in scenes
• Signal-based flow: Connect AeThex signals for auth success/failure
Performance Optimization
• Cache API responses: Store user data locally, sync periodically
• Batch requests: Group multiple API calls when possible
• Background threads: Use Thread or WorkerThreadPool for heavy API work
• Offline mode: Implement local fallback when API is unreachable
{/* Resources */}
{/* Next Steps */}
Ready to Build?
Create cross-platform games with Godot Engine and AeThex. Export to PC, mobile, web,
and console with unified cloud saves, leaderboards, and authentication.
);
}