Unreal Engine SDK

Integrate Asobi into your Unreal Engine 5.7+ project. Blueprint-callable on every subsystem.

View on GitHub

Installation

Clone the SDK into your project's Plugins/ directory:

cd YourProject/Plugins
git clone https://github.com/widgrensit/asobi-unreal.git AsobiSDK

Regenerate project files, then enable "Asobi SDK" in Edit → Plugins → Networking.

Quickstart

Authenticate, open the WebSocket, queue in matchmaker, and receive match.state:

UAsobiClient* Client = NewObject();
Client->SetBaseUrl(TEXT("http://localhost:8080"));

UAsobiAuth* Auth = NewObject();
Auth->Init(Client);

FOnAsobiAuthResponse OnLogin;
OnLogin.BindDynamic(this, &AMyPawn::OnLoggedIn);
Auth->Login(TEXT("player1"), TEXT("secret"), OnLogin);

// After login:
WebSocket->Connect(TEXT("ws://localhost:8080/ws"));
WebSocket->Authenticate(Client->GetAuthToken());
Matchmaker->Add(TEXT("arena"), {}, OnQueued);
WebSocket->OnMatchState.AddDynamic(this, &AMyPawn::OnMatchState);

Connect to a world

For MMO-scale sessions, use the Worlds API. Clients subscribe to typed delegates for world.joined, world.tick, and world.terrain:

WebSocket->OnWorldJoined.AddDynamic(this, &AMyPawn::OnWorldJoined);
WebSocket->OnWorldTick.AddDynamic(this, &AMyPawn::OnWorldTick);
WebSocket->OnWorldTerrain.AddDynamic(this, &AMyPawn::OnTerrain);

// Find-or-create keeps players in the same world until it fills.
WebSocket->WorldFindOrCreate(TEXT("open-world"));

void AMyPawn::OnWorldTick(int64 Tick, const FString& UpdatesJson) {
    // Decode UpdatesJson into entity deltas and apply.
}

Demo project

A minimal top-down arena demo is available:

git clone --recursive https://github.com/widgrensit/asobi-unreal-demo.git

Open AsobiUnrealDemo.uproject in UE 5.7+, hit Play. See asobi-unreal-demo on GitHub.