What's The Preferred Networking Setup

Hey guys. I’m new to Defold but known of it. Might have fiddled with it years ago. I have used Love2d and Urho3d (lua scripting) for 9 years, both 2d and 3d. I am not a beginner when it comes to making games or using lua. In fact, that’s the only language I use. However, I am looking to make my first online multiplayer game. I’ve tried to do so in the past but each time gave up because, well, doing online multiplayer ended up being a nightmare. I can easily make the game portion I am planning to with lua in Urho3d, if it were only local or splitscreen. But that engine lacks usable online multiplayer solutions and creating my own for it is over my head. So I settled on Defold as it looks like the easiest way to go forward in my case (no new languages, code-based editing that I’m used to, looks like it has good online plugins).

My goals:

  1. 2d realtime multiplayer fight arena (with a cool twist) similar to the game Rounds
  2. host and join games, play with friends by joining their hosted game lobby
    That’s it. It’s a pretty simple idea as I think that’s best for my first online multiplayer game.

What is the best networking setup for a game like this? I don’t mind diving into and learning something but I want to make sure I’m choosing the solution that makes the most sense for my case. I see there is Colyseus and Nakama and some others. I don’t mind paying for a server, digital ocean droplet, or whatever. I just want to choose the solution with the least friction so I can focus on the game itself.

I noticed there are some older forum topics and old samples (Tic tac toe). Is there a good example or recent sample I should look at for this?

Thanks!

2 Likes

Colyseus and Nakama are both really good options! There’s also:

Edit: The Nakama service recently did a big update of their API and the Defold Tic-Tac-Toe example has not been updated to the new version. I’ll try to do this soon. The basic principles still apply though.

4 Likes

I’ll check these out, appreciate it.

Returning to this. It looks like you made the plugin for SteamWorks for Defold. I should be able to make a simple p2p game using steam’s servers instead it seems. Correct me if I’m wrong, but wouldn’t that be easier, if I plan only for a steam release?
Because then I wouldn’t need a signalling server (free, and less work). I can just sendp2p packets and do a simple p2p game.

1 Like

Correct. Or rather, I created the code to generate Lua bindings for the Steamworks API. I haven’t tested each and every generated API function, but the extension had been used for quite some time by others so I assume everything is working as it should.

2 Likes

Awesome. I’m going to give it a shot. I was mistaken before when I thought SteamWorks api was only for stuff like leaderboards and achievements. Thanks for your work on the bindings.

1 Like