Search Unity

Nakama - an open-source distributed server for realtime games

Discussion in 'Assets and Asset Store' started by AlimHL, Mar 7, 2017.

  1. AlimHL

    AlimHL

    Joined:
    Dec 30, 2016
    Posts:
    4
    What is Nakama?

    Nakama is an open-source distributed social and realtime server for games and apps. It includes a large set of services for users, data storage, and realtime client/server communication; as well as specialized APIs like realtime multiplayer, groups/guilds, and chat.

    Nakama works with any kind of games device including consoles and VR headsets; and across games platforms like iOS, Android, and Windows Phone.

    Nakama is your entire backend:
    - Open-source Apache 2.0 licence.
    - Available for Mac, Windows, and Linux.
    - You can run Nakama locally for development and even on site for eSports events.
    - Run in any cloud of your choice. No more lock-in to specific providers or cloud services.
    - Only requires one database to operate. Performance is carefully designed for the database engine.
    - FPS, PvP, Arcade, MMO and all variety of modern, realtime or turn-based gameplay.

    Features:
    - User accounts with optional social login (Facebook, Google, Steam, GameCenter)
    - Data storage for save games, maps, items, and other gameplay objects
    - Friend list, combined with Facebook and custom lists
    - Social graph between groups of users for creation of guilds and clans
    - In-game chat in groups, 1-on-1, and world chat with persistent chat history
    - Realtime (and turn-based) with optional server-authoritative multiplayer
    - Presence system and notification when users come online
    - Customize server behaviour with Lua scripts (soon to be released)
    - Plugin addon system to pipe information to other system including third party services (like analytics).
    - Much, much more

    About the team:
    Heroic Labs builds Nakama; A team of engineers with backgrounds in distributed databases, big data analytics and high-volume mobile application APIs.

    The team's goal is to solve every pain point with cloud services and game server development. We want to make it effortless for any game studio to build beautiful social and multiplayer games which work at massive scale.

    Download, Documentation and Community:
    You can find the documentation here. Take a look at the source code on GitHub and follow our development roadmap online. Download the Unity client from the Asset Store.

    We have an active community on Gitter and would love for you to drop in to chat with engineers and fellow community members.

    We welcome all contributions, bug reports, stars, and feature requests!
     
  2. DungDajHjep

    DungDajHjep

    Joined:
    Mar 25, 2015
    Posts:
    202
    can i use it with unet, as a matchmaking, replay service?
     
  3. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    @DungDajHjep You can use it in combination to unet. Nakama doesn't have a Matchmaking API yet but we are working on it. Jump on the Gitter chat channel if you need more info.
     
  4. AlimHL

    AlimHL

    Joined:
    Dec 30, 2016
    Posts:
    4
    Hello everyone,

    The official 1.0 of Nakama has been released! You can read it on our Blog, there's an announcement on VentureBeat, and you can download it right now from GitHub.

    A lot has happened in recent updates including features such as IAP support, in-app notifications, brand new documentation, and a lot more. We'd love to hear your feedback and thoughts :)
     
    tng2903 likes this.
  5. milox777

    milox777

    Joined:
    Sep 23, 2012
    Posts:
    195
    Seems cool, I pinged you about hosted cloud solution, when it'll be available?
     
  6. AlimHL

    AlimHL

    Joined:
    Dec 30, 2016
    Posts:
    4
    I've responded to your email :) It is currently available in early-access.
     
  7. vitrute

    vitrute

    Joined:
    Feb 12, 2018
    Posts:
    1
    Hello community,

    Because I prefer to think about the future - read some notes if you really care about your project.

    1) Nakama is NOT an open-source distributed server. It is an absolute lie, but developers continue to tell you that everywhere. Unless you are a developer, fork a repo and rewrite it - there is no chance to create a distributed scheme for your project. Open-source Nakama is a SINGLE server only. If you want to connect even 2 of them - you will have to pay for the enterprise version!

    2) Let's check most popular game backends, for example from here - http://blog.soom.la/2016/02/top-10-parse-alternatives-game-backend.html. Are you surprised that most of them have an official pricing list? You shouldn't be. Examples:
    - http://getbraincloud.com/pricing-overview/
    - https://www.photonengine.com/en-US/Realtime/pricing
    - http://www.gamedonia.com/realtime/pricing
    - https://www.gamesparks.com/pricing/
    - https://playfab.com/pricing/#plan-essentials-desktop
    - https://www.kinvey.com/pricing/

    After that check Nakama's website - https://heroiclabs.com/. See the difference? They don't provide ANY number, you have absolutely no idea how much that will cost to you. Even if you ask - they wont tell you anything! Imagine a situation - you are a new project, you have first income, and after deciding to create basic cluster of just 2 nodes, just for a stability - Nakama owners suddenly requires you to pay 5000 USD per node per month. How about that? Why? Just because "why not?". There are nowhere any official numbers. Or another way is possible - if you earn 100 USD from your game - they ask 10 USD; if you earn 100 000 USD - they ask you 10 000 USD. Why? Why not?! You can get a response "You got so much money, so paying 10k will not be a problem for you". That's the similar answer I've got, before starting implementing Nakama, after asking about the future options. Will I use Nakama after that? Of course not.

    What will you do after that happens? Rewriting the whole backend system?

    3) They say "We wanted to change the status quo and democratize the industry" - do they know the meaning of this word "democratize"? When offering a fishy project had become a democracy? Marketing and only marketing, the only thing is to get your money. Why a core is open-source? Because that makes you dependent from Nakama. It's very difficult to rewrite the whole backend. When you are stuck at the Max open-source version capabilities - real "fun" will begin for you. And you won't be able to do anything, Nakama will dictate whatever they want to you. Unless you want to close your project - you will have to listen to them!

    4) You can tell them all these things - do they edit the project description, so community is sure what it gets - NO. Nobody cares.

    5) If you are good at scaling and clustering, and you want to improve your Go-lang skills - this is a perfect option: fork Nakama repo, rename and start implementing clustering features for your own project. Or create another tool which can use existing Nakama service "as is".



    Conclusion - if you really care about the future of you project - I highly recommend to NOT use Nakama. Unless they add an official pricing list and solve all these fishy things, so people are absolutely clear what they get now and what will get in the future. Will I use Nakama for the serious things now? Of course not!

    Good luck to all, think Before doing something, not After.
     
    Last edited: Feb 12, 2018
    Flavelius likes this.
  8. novabyte

    novabyte

    Joined:
    Feb 27, 2015
    Posts:
    12
    Ok. Normally I'd avoid a flame bait post like this especially as I know who you are and we already spoke together about how you could achieve what you wanted with your games but as the internet never forgets I'd like to offer our position on Nakama server.

    I'll reply to each of your points:

    (1) The server is concurrent, distributed, and open-source. The first and last points are irrefutable. The second point is where your debate (anger?) is focused. We describe the server as distributed because it can be run and scaled across multiple physical servers. This can be done by running a load balancer between clients and Nakama instances and also a load balancer between Nakama and the database cluster as usual. I don't know whether you've considered this but it's pretty standard practice with server deployments of any kind.

    Nakama Enterprise adds the option to distribute all presences connected to each of the servers across the entire cluster with chat, in-app notifications, multiplayer, and realtime streams (pub/sub). We use CRDTs, SWIM protocol, and GRPC to power this cluster technology. It is not part of the open-source but also **not** necessary to run Nakama server in a distributed way.

    (2) This is an apples to oranges comparison. You're comparing various SaaS services to our product offering. If you'd like to compare fair with fair then please look at our Managed Cloud service (whose link you know I already shared with you). These prices are public just like the others you mentioned.

    I'm not going to comment on the absurd numbers in your post about license costs for Nakama Enterprise. You know what our Managed Cloud service prices look like and yet you've ignored it to build up some inflammatory story to be dramatic.

    (3) We know well what the word "democratize" means. We're proud that we can enable game studios of any size to build games as successful as Clash Royale with our open-source code. We also understand that we need to live and grow as a company otherwise we'd not be able to continue to work on the project. This is how life works.

    (4) I explained over email with you why we've described the project as we have. Nothing more to say; you've chosen to disagree, draw your own conclusion, and lie about it here.

    (5) This is the culmination of 3 years of development experience on game server projects by a small team of highly skilled server engineers. My best advice is social and realtime server features are non-trivial at scale. If you'd prefer to build yourself anyway I wish you best of luck.

    I think something /u/Hellogamingworld mentioned well is that at some point each open-source project needs a commercial offering or component to support the team who dedicates so much time to it.

    Disclosure: I work at Heroic Labs and contribute to the open-source code for Nakama server.
     
    kako_pedreros, Musketeer and Nateply like this.
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Hi, due to complaints, I've done a temp thread ban on vitrute and novabyte, not because anyone's wrong, it's just not really the place for it and they can take it to PM. Leaving both posts so people can draw their own conclusions.
     
    Nateply likes this.
  10. Ceciphar

    Ceciphar

    Joined:
    Jan 21, 2017
    Posts:
    51
    Does it support p2p yet?
     
  11. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    Nakama has both relayed multiplayer as well as server-authoritative multiplayer. Nakama is not a peer-to-Peter NAT punchthrough service, and won’t be either as there are many such systems available.

    Please note that you don't have to use the multiplayer system to use the rest of the features of the Nakama (like friends, groups, clans etc).

    If you want to know more, feel free to join the community discussion here:

    https://gitter.im/heroiclabs/nakama
     
  12. Ceciphar

    Ceciphar

    Joined:
    Jan 21, 2017
    Posts:
    51
    Sorry I'm new to this so, does that mean I have to get a Vm. Or can i make the player host the sever.

    Edit: After some reading I found this https://heroiclabs.com/managed-cloud/ does it mean I won't have to buy a VM and heroiclabs would just host the sever using their managed cloud service.
     
    Last edited: Sep 23, 2018
  13. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    is there also a docker-composer.yml for a SECURE (not --insecure) environment? i find the whole installation process more than complicated. the system looks very interesting and promising, but unfortunately i can't get a clean installation on my server.
     
  14. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    @Diego_Graphics You can see in the CockroachDB docs how you would set up certificates and in the Nakama docs how to use a secure DB connection string.

    We'd love some feedback on how to make the installation process easier. We've always felt docker-compose's one-command setup is hard to beat, can you help us improve it?
     
  15. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    I'm not completely new to server management. i've been running two debian servers for several years, primarily for webhosting, with docker i only have basic experience, everything you need to know to install jira, bitbucket or gameserver over it. that's relatively simple. otherwise i'm used to databases like mysql which are simply connected via username, password.

    i didn't have any contact with cockroach before. now i've been trying the installation for 3 days. insecure is no problem at all.

    a bash installer would make sense, i think. just a file (install_nakama.sh) that automatically installs two docker containers (one for cockroachDB and one for nakama itself) and secures them.

    i tried to experiment with the docker-compose.yml you refer to in https://heroiclabs.com/docs/install-docker-quickstart/ by creating my own cockroachdb build where i try to do the secure actions before cockroach starts.

    It works to create the certs and the my-safe-directory folder and also to create the certificates, but then I get the error every time

    ERROR: cockroach server exited with error: consider changing the port via --listen-addr: listen tcp 188.68.41.90:26257: bind: cannot assign requested address

    as i understand it, the big advantage of cockroachdb is that it can be split into clusters to ensure permanent and fast availability. this is of course great especially for games that expect a lot of tarific. but still a simple installation that is secure would be very useful.

    i had already successfully done the tutorial ( https://www.cockroachlabs.com/docs/v2.1/orchestrate-cockroachdb-with-docker-swarm.html ) and installed a secure installation of the cockroachdb but i can't get a connection with nakama to the cockroachDB.
     
  16. mofirouz

    mofirouz

    Joined:
    Jul 14, 2015
    Posts:
    27
    Thanks @Diego_Graphics - I'll take your notes to the developer evangelist team and will discuss improvements to the documentation and the developer workflows. To answer your questions:

    1. The error you pasted about CockroachDB is simple - you already have a CockroachDB instance running on your system, while you are trying to start a second instance. Because of this, the port 26257 is already in use and you either need to stop the first instance, or instruct the second instance to run on another port number.

    2. Alternatively to CockroachDB, you can use PostgreSql with Nakama unofficially. Here is the docker-compose file.

    3. We have documentation about how to connect a secure installation of CockroachDB with Nakama. Admittedly this is small docs but it does tell how to do the necessary configuration. What do you need to setup a secure CockroachDB cluster? Are you exposing this to the clients and WAN?
     
    valentinwinkelmann likes this.
  17. valentinwinkelmann

    valentinwinkelmann

    Joined:
    Nov 3, 2014
    Posts:
    191
    Thank you very much for your answer.
    I will do the installation once via PostgreSql . Thanks for the Docker-Compose file! I had also looked for it in the documentation page. or a detailed guide on how to use the PostgreSql database. A Docker-Compose file is of course much better here. Maybe you can add it to the "Docker quickstart" section, there is already the Docker-Compose.yml file for Nakama & CockroachDB.

    If I had a second instance of the CockroachDB running or not I can't exactly reconstruct now. but I mean that this was not the case. at the moment I have for the development the nakama server in the Insecure mode and i gave up to install the cockroachDB cleanly. but I will try it once with PostgreSql .

    So basically for the documentation I think a complete instruction how to set up a simple BUT secured nakama server in connection with CockroachDB would be necessary.
    Maybe this is something more for you to write in the documentation but I think it makes sense for all Unity developers who are not 100% familiar with very modern web techniques.
    When I find time I will continue to try to set up the CockroachDB, but for now I will experiment extensively with the nakama server around. I want to say it again, except for the complicated installation the whole project looks damn good.
     
    mofirouz likes this.
  18. AlimHL

    AlimHL

    Joined:
    Dec 30, 2016
    Posts:
    4
    Quick update for everyone:

    We've released an open-source Unity demo game which has been integrated with Nakama! It's Clash Royale inspired in terms of gameplay mechanics. You can read about it in PocketGamer and download the game from GitHub :)

    You're welcome to also join our community in Gitter where our engineers and fellow developers hang out to ask and answer questions.
     
    milox777 and valentinwinkelmann like this.
  19. UnityVinay

    UnityVinay

    Joined:
    Jun 12, 2017
    Posts:
    1
    In Nakama is there any CCU limitations?