The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

Each player stores the local "Best Lap" value, but then I want to compare each of it to the "Record" value and update "Record" value in all of the devices if one of the individual "Best Lap" values < "Record" value.

Example:

Player A:
Best Lap: 1:28.548
Record: 1:26.784

Player B:
Best Lap: 1:25.487
Record: 1:26.784

As Player B beats the Record time of all, "Record" must be updated in all devices to be "1:25.487".

What is the way of collecting "Best Lap" values from all devices, compare them to "Record" value and share it back to devices if it was updated?

Thank you for your time!

Godot version 3.2.3
in Engine by (373 points)

To make things easier, instead of collecting values from all devices, I'd rather be interested in comparing Best Lap value to Record value locally in each device, and if Best Lap < Record then update Record value in all devices.

Q: How to update a value in all devices?

1 Answer

0 votes

The only way to solve this problem is to have a central storage for user data. So you need a server...
There are many ways to have a server with Godot game. One of the easiest player's data storage solution is https://silentwolf.com/ - it's a free server & data hosting.
More advanced server is Nakama, but you'll need a VPS to host it somewhere. You can create server with Godot AFAIK, but you'll also will need a VPS.

by (122 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.