All Projects → heroiclabs → Nakama

heroiclabs / Nakama

Licence: apache-2.0
Distributed server for social and realtime games and apps.

Programming Languages

go
31211 projects - #10 most used programming language
lua
6591 projects
typescript
32286 projects
HTML
75241 projects
shell
77523 projects
SCSS
7915 projects

Projects that are alternatives of or similar to Nakama

Colyseus
⚔ Multiplayer Framework for Node.js
Stars: ✭ 3,817 (-27.89%)
Mutual labels:  multiplayer, game-server, realtime-games
Gameproject3
游戏服务器框架,网络层分别用SocketAPI、Boost Asio、Libuv三种方式实现, 框架内使用共享内存,无锁队列,对象池,内存池来提高服务器性能。还包含一个不断完善的Unity 3D客户端,客户端含大量完整资源,坐骑,宠物,伙伴,装备, 这些均己实现上阵和穿戴, 并可进入副本战斗,多人玩法也己实现, 持续开发中。
Stars: ✭ 655 (-87.63%)
Mutual labels:  multiplayer, game-server, game-framework
Nakama Unity
Unity client for Nakama server.
Stars: ✭ 222 (-95.81%)
Mutual labels:  social, multiplayer, realtime
nakama-java
Android optimized Java client for Nakama server.
Stars: ✭ 26 (-99.51%)
Mutual labels:  realtime, game-server, nakama
Nakama Godot
Godot client for Nakama server written in GDScript.
Stars: ✭ 240 (-95.47%)
Mutual labels:  social, multiplayer, realtime
SocketIOUnity
A Wrapper for socket.io-client-csharp to work with Unity.
Stars: ✭ 69 (-98.7%)
Mutual labels:  multiplayer, realtime
syncwatch
Browser extension to watch videos together
Stars: ✭ 48 (-99.09%)
Mutual labels:  social, realtime
nakama-examples
A mono repo with project examples for the Nakama client libraries.
Stars: ✭ 22 (-99.58%)
Mutual labels:  realtime, nakama
nakama-docs
Documentation for Nakama social and realtime server.
Stars: ✭ 44 (-99.17%)
Mutual labels:  game-server, nakama
mangband
A free online multi-player realtime roguelike game based on Angband
Stars: ✭ 54 (-98.98%)
Mutual labels:  multiplayer, realtime
haskell-tic-tac-toe
A multiplayer web real-time implementation of the famous Tic Tac Toe game in Haskell.
Stars: ✭ 51 (-99.04%)
Mutual labels:  multiplayer, game-server
Kosm-Classic-FPS-Template-UE4
Classic Arena First-Person-Shooter Mechanics for Unreal Engine 4.
Stars: ✭ 38 (-99.28%)
Mutual labels:  multiplayer, unreal-engine
fishgame-macroquad
"Fish Game" for Macroquad is an online multiplayer game, created as a demonstration of Nakama, an open-source scalable game server, using Rust-lang and the Macroquad game engine.
Stars: ✭ 123 (-97.68%)
Mutual labels:  multiplayer, nakama
Crystalshire
Legacy VB6 open-source ORPG
Stars: ✭ 24 (-99.55%)
Mutual labels:  multiplayer, game-server
forum
real-time forum software written in javascript. could very well replace your old phpBB forum (it replaced ours). react+redux, node, postgres.
Stars: ✭ 28 (-99.47%)
Mutual labels:  social, realtime
Realtime Server
A realtime dedicated game server ( FPS / MOBA ). 一个实时的专用游戏服务器.
Stars: ✭ 358 (-93.24%)
Mutual labels:  game-server, realtime
Game Networking Resources
A Curated List of Game Network Programming Resources
Stars: ✭ 4,208 (-20.5%)
Mutual labels:  multiplayer, unreal-engine
Wsify
Just a tiny, simple and real-time self-hosted pub/sub messaging service
Stars: ✭ 452 (-91.46%)
Mutual labels:  realtime, backend
Agones
Dedicated Game Server Hosting and Scaling for Multiplayer Games on Kubernetes
Stars: ✭ 4,252 (-19.67%)
Mutual labels:  multiplayer, game-server
basic multiplayer unity
UDP Client-Server implementation in Unity
Stars: ✭ 44 (-99.17%)
Mutual labels:  multiplayer, game-server

Nakama

GitHub release Forum License

Distributed server for social and realtime games and apps.

Features

  • Users - Register/login new users via social networks, email, or device ID.
  • Storage - Store user records, settings, and other objects in collections.
  • Social - Users can connect with friends, and join groups. Builtin social graph to see how users can be connected.
  • Chat - 1-on-1, group, and global chat between users. Persist messages for chat history.
  • Multiplayer - Realtime, or turn-based active and passive multiplayer.
  • Leaderboards - Dynamic, seasonal, get top members, or members around a user. Have as many as you need.
  • Tournaments - Invite players to compete together over prizes. Link many together to create leagues.
  • Parties - Add team play to a game. Users can form a party and communicate with party members.
  • Runtime code - Extend the server with custom logic written in Lua, TypeScript/JavaScript, or native Go code.
  • Matchmaker, dashboard, metrics, and more.

Build scalable games and apps with a production ready server used by ambitious game studios and app developers all around the world. Have a look at the documentation and join the developer community for more info.

Getting Started

The server is simple to setup and run for local development and can be deployed to any cloud provider. See the deployment notes for recommendations on how to deploy the project for production. Nakama server requires CockroachDB or another Postgres wire-compatible server as it's database.

Docker

The fastest way to run the server and the database is with Docker. Setup Docker and start the daemon.

  1. Set up a docker-compose file and place it in a folder for your project.

  2. Run docker-compose -f ./docker-compose.yml up to download container images and run the servers.

For more detailed instructions have a look at our Docker quickstart guide.

Nakama Docker images are maintained on Docker Hub and prerelease images are occasionally published for cutting edge features of the server.

Binaries

You can run the servers with native binaries for your platform.

  1. Download the server from our releases page and the database.

  2. Follow the database instructions to start it.

  3. Run a migration which will setup or upgrade the database schema:

    nakama migrate up --database.address "[email protected]:26257"
  4. Start Nakama and connect to the database:

    nakama --database.address "[email protected]:26257"

When connected you'll see server output which describes all settings the server uses for configuration.

{"level":"info","ts":"2018-04-29T10:14:41.249+0100","msg":"Node","name":"nakama","version":"2.0.0+7e18b09","runtime":"go1.10.1","cpu":4}
{"level":"info","ts":"2018-04-29T10:14:41.249+0100","msg":"Database connections","dsns":["[email protected]:26257"]}
...

Usage

Nakama supports a variety of protocols optimized for various gameplay or app use cases. For request/response it can use GRPC or the HTTP1.1+JSON fallback (REST). For realtime communication you can use WebSockets or rUDP.

For example with the REST API to authenticate a user account with a device identifier.

curl "127.0.0.1:7350/v2/account/authenticate/device?create=true" \
  --user "defaultkey:" \
  --data '{"id": "someuniqueidentifier"}'

Response:

{
"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MjQ5OTU2NDksInVpZCI6Ijk5Y2Q1YzUyLWE5ODgtNGI2NC04YThhLTVmMTM5YTg4MTgxMiIsInVzbiI6InhBb1RxTUVSdFgifQ.-3_rXNYx3Q4jKuS7RkxeMWBzMNAm0vl93QxzRI8p_IY"
}

There's a number of official client libraries available on GitHub with documentation. The current platform/language support includes: .NET (in C#), Unity engine, JavaScript, Java (with Android), Unreal engine, Godot, Defold, and Swift (with iOS). If you'd like to contribute a client or request one let us know.

Nakama Console

The server provides a web UI which teams can use to inspect various data stored through the server APIs, view lightweight service metrics, manage player data, update storage objects, restrict access to production with permission profiles, and gain visibility into realtime features like active multiplayer matches. There is no separate installation required as it is embedded as part of the single server binary.

You can navigate to it on your browser on http://127.0.0.1:7351.

Deployment

Nakama can be deployed to any cloud provider such as Google Cloud, Azure, AWS, Digital Ocean, Heroku, or your own private cloud. You should setup and provision separate nodes for Nakama and CockroachDB.

The recommended minimum production infrastructure for CockroachDB is outlined in these docs and Nakama can be run on instance types as small as "g1-small" on Google Cloud although we recommend a minimum of "n1-standard-1" in production. The specific hardware requirements will depend on what features of the server are used. Reach out to us for help and advice on what servers to run.

Heroic Cloud

You can support development, new features, and maintainance of the server by using the Heroic Labs' Heroic Cloud for deployment. This service handles the uptime, replication, backups, logs, data upgrades, and all other tasks involved with production server environments.

Have a look at our Heroic Cloud service for more details.

Contribute

The development roadmap is managed as GitHub issues and pull requests are welcome. If you're interested to add a feature which is not mentioned on the issue tracker please open one to create a discussion or drop in and discuss it in the community forum.

Simple Builds

All dependencies required for a build are vendored as part of the Go project. We recommend a modern release of the Go toolchain and do not store the codebase in the old GOPATH.

  1. Download the source tree.

    git clone "https://github.com/heroiclabs/nakama" nakama
    cd nakama
  2. Build the project from source.

    go build -trimpath -mod=vendor
    ./nakama --version

Full Source Builds

The codebase uses Protocol Buffers, GRPC, GRPC-Gateway, and the OpenAPI spec as part of the project. These dependencies are generated as sources and committed to the repository to simplify builds for contributors.

To build the codebase and generate all sources follow these steps.

  1. Install the toolchain.

    go install \
        "google.golang.org/protobuf/cmd/protoc-gen-go" \
        "google.golang.org/grpc/cmd/protoc-gen-go-grpc" \
        "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway" \
        "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2"
  2. If you've made changes to the embedded Console.

    cd console/ui
    ng serve
  3. Re-generate the protocol buffers, gateway code and console UI.

    env PATH="$HOME/go/bin:$PATH" go generate -x ./...
  4. Build the codebase.

    go build -trimpath -mod=vendor

License

This project is licensed under the Apache-2 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].