Help Needed! - Multiple Questions - [Answered]

Hello!

I have a couple of questions to ask about how to implement some features.
I am quite familiar with defold now and I want to create a multiplayer mobile game, and need help figuring out the following:

  1. Do I need a server for multiplayer games? If yes, what is the best one to use with defold?

  2. How to save a player’s progress? Is it done locally on the player’s phone or can it be stored on a server?

  3. If I want players to have accounts and want to use Facebook login, do I need a server? is there some sort of feature to save progress using Facebook login?

  4. My game needs to be multiplayer because it includes trading between two players. Any help on how to do that in defold?

Sorry for asking too many questions, but I need to know if I can manage to create such a game.

Thanks a lot in advance

2 Likes

Yes, unless you try some kind of peer to peer setup where the players communicate without a central server.

It depends on the game. PlayFab is a good alternative for matchmaking and non-realtime games. Photon is an alternative for realtime. Amazon Gamelift would be a third if you want a custom server.

Progress should preferably be stored online, but you could store it locally with the risk of resetting if uninstalling the game or moving from one device to another.

Facebook login can be done using Defold. Check the documentation.

Defold has very little to do with this. Defold can make HTTP calls or TCP/UDP socket communication to any server. The choice of server is yours and it is nothing that Defold provides.

4 Likes

If you want to save locally

local path = sys.get_save_file("mygame", "userdata") --Filename
local data = sys.load(path) -- Load
sys.save(path, data) --Save
3 Likes

Thank you so much @britzl and @Vincent . Your help is highly appreciated!

One more question: @britzl
"Progress should preferably be stored online, but you could store it locally with the risk of resetting if uninstalling the game or moving from one device to another."
Do you mean that I should store it in a cloud service or something like that? If not can you please illustrate further?

Thanks again :heart_eyes:

1 Like

Yes. Being able to move from one device to another and retain player progression is a nice experience for the player.

1 Like