Developer Documentation

4Players ODIN

ODIN is a cross-platform software development kit (SDK) that enables developers to integrate real-time chat technology into multiplayer games, apps and websites.

Did you just purchase ODIN and arrived here? Please generate an Access Key , if you not already have done so.

Easy integration

ODIN can be easily integrated in all your apps, websites, games and experiences with a couple lines of code. As 4Players handels servers and maintenance for you, you’ll have a production ready voice-chat and data synchronization layer implemented in your app in no-time.

These examples give you an idea how easy it is to implement ODIN in various programming languages. Please note that these are simplified examples, in real-world implementations you’ll have a couple of lines more for error handling.

Our ODIN SDK is deeply integrated into Unity and features automatic 3D spatial audio. Use the tools you know like AudioSource and AudioListener or the built-in Unity AudioMixer for your voice chat integration.

Manage all aspects of our Voice SDK within Unity and integrate it in a couple of hours into your game or XR experience.

Our ODIN SDK is deeply integrated into Unreal Engine 4 (UE4) and Unreal Engine 5 (UE5) and features Blueprint support and automatic 3D spatial audio. Our Voice SDK leverages Unreal Engines audio processing so that you can use the tools you know and love!

Manage all aspects of our Voice SDK within the Unreal Engine Editor and integrate it in a couple of hours into your game or XR experience.

Integrating our Voice SDK in any website with vanilla JavaScript is seamless, effortless, and easy. Add our script and join a room, that’s it.

<html>
    <head>
        <script type="text/javascript" src="https://4npcdn.com/2355/odin/javascript/latest/odin.min.js"></script>
        <script type="text/javascript">
            var connectOdin = async function(room, user) {
                const token = await getToken(room, user);
                const odinRoom = await OdinClient.initRoom(token);
                await odinRoom.join();
                return odinRoom;
            }
            connectOdin("My Room", "John Doe").then(odinRoom => {
               console.log("Connected to room", odinRoom);
            });
        </script>
    </head>
</html>

Adding our Voice SDK to any modern JavaScript framework like Angular, Svelve, Vue, React is super easy. Just add our npm package @4players/odin to your package.json and connect a room. That’s it.

import { OdinClient } from '@4players/odin';
import { TokenGenerator } from "@4players/odin-tokens";

const generator = new TokenGenerator(apiKey);
const token = generator.createToken("My Room", "John Doe");
const odinRoom = await OdinClient.initRoom(token);
await odinRoom.join();

Add ODIN to your C or C++ projects with our simple to use ODIN Core SDK. Our Core SDK is the foundation of all other SDKs and features an easy-to-use interface.

// Generate access token - should be done on a server
char room_token[512];
OdinTokenGenerator* generator = odin_token_generator_create("__YOUR_ACCESS_KEY__");
odin_token_generator_create_token(generator, "My Room", "John Doe", room_token, sizeof(room_token));
odin_token_generator_destroy(generator);

// Setup event handler and join a room.
OdinRoomHandle room = odin_room_create();
odin_room_set_event_callback(room, handle_odin_event, NULL);
odin_room_join(room, gateway_url, room_token);

Why 4Players?

4Players is hosting game and voice servers globally for decades. We know what developers need. We know what gamers want. We know how essential reliability, awesome voice quality, low CPU usage and zero FPS hit, noise suppression and low latency are for a great voice chat experience, especially in immersive real-time applications like games.

VoIP veterans, server admins, gamers and mod makers came together to create the essential in-game voice chat solution for Unity and Unreal Engine built on latest software technologies like QUIC and HTTP3. You don’t have to worry about maintenance, server hosting or day-to-day operations. You don’t have to learn anything new. You just leverage your Unity skills and focus on delivering the best game possible.

With support for spatial 3D audio support as well as massive scalability, zero configuration or bookkeeping it has never been easier to utilize best-in-class voice chat for your games, video conferencing and XR applications.

In addition to that, we also provide SDKs for various other platforms including the web with TypeScript and Vanilla JavaScript support and even console clients for automatic data processing. This ODIN, all your real-time data synchronization are solved and implemented in no time, being it pure data and/or voice.

Give it a try

We have created a couple of simple multiplayer experiences that allow you to play around with ODIN together with your friends and colleagues. Download the samples for Windows, Mac or Linux and experience cross-platform 3D voice chat in a dynamic environment.

Open Source Sample

Download and test our PUN based multiplayer sample built with Unity complete with source and documentation. The sample also features many scripts for audio effects like damping and general bookkeeping stuff.

Multiplatform Showcase

Talk to other players with 3D positional voice and a walkie-talkie in multiple channels. We also feature a web-based commander that you can use to interact with players directly from your browser.

FPS Shooter

A simple but fun FPS shooter on desert style maps. ODIN 3D positional voice is integrated so that you can talk to other players with voice or radio broadcast in a real game. Have fun!

SwiftUI Sample

A simple but fully functional SwiftUI sample that leverages OdinKit to build an iOS app that allows you to chat with friends in no time.

First Steps

Begin with our Introduction to learn more about ODIN, how it works, which benefits and key features we provide.

Game Engine Integration

If you are more into just experimenting, then choose your game engine and get started quickly with our quick and easy onboarding guides. You’ll have a running example to experiment with in less than 20 minutes without any registration!

Unity

Use our deep Unity integration to add the most immersive in-game voice chat to your product with minimal development overhead.

Unreal Engine

Our upcoming Unreal Engine plugin will feature full support for all available platforms and come with Blueprint and C++ support.

Web/Apps Integration

ODIN is also available for the web. You can implement real-time voice with a couple lines of code in your web based applications and websites. Just add our NPM package with npm install @4players/odin to install. We also support vanilla JavaScript for those who don’t like frameworks like Angular, React or React Native.

More info can be found in our JavaScript SDK.

Swift/SwiftUI Integration

OdinKit provides easy real-time voice integration for iOS and macOS apps. Integration is as easy as a couple lines of code. You can also use our SwiftUI sample to get started quickly.