[SOLVED] Create a server-based game with Defold: where to start? Any advices/recommendations?

Yes.

Client / Server example:

Thread with some resources:
https://forum.defold.com/t/how-many-defold-users-are-utilizing-nakama/

I recall totebo working on a Nakama game, however I’m not going to volunteer or ping him about it.

Backend in this context means a server that the clients (players) do not have direct access to that is running game logic, editing a database, communicating with other online services, authenticating users, etc. All of this should be protected from the mishandling of clients, so we run all of it on the backend. Only developers should have access to it.

As stated above, this is the opposite of what you want with a multiplayer game.

Anyway, there are a million technical details I could cover about how to properly implement something like an MMO. I recommend you seek out articles online.

You should do as much research on multiplayer as you can before starting. You need to know about things like P2P, server authority, client-side prediction, how data is sent over networks, the programming paradigm for dummy clients sending messages to a server then rendering the server’s response, server-side security, how to deploy and maintain a server on some cloud provider like Google Cloud Platform or Amazon Web Services, how to encapsulate and manage your server-side application in a Docker container, etc.

Also keep in mind that realtime multiplayer games generally need to be created from scratch. Almost your entire codebase will revolve around the client-server paradigm, and it will look nothing like a singleplayer codebase. Typically singleplayer games that also have a multiplayer option are actually only multiplayer: starting a singleplayer session launches the game on a local server so the multiplayer game architecture can be reused. Otherwise, you may have to rewrite all of your game’s logic on the client.

This is certainly not an impossible task, but it is an arduous one. Luckily backend frameworks like Nakama will assist you greatly. Good luck!

5 Likes