Copy from PM, in case anyone will have similar need it in future.
You need some dictionary in which you store choices player have made.
Such dictionary must be created at start label, so it can track current game.
When player select option you update dictionary.
Then periodically or at game end, you send this dictionary to server where you combine it with other players data.
At game end you request average data from server and compare it with current game choices dictionary and show player results.
Code: Select all
menu:
"What should I do first?"
"Fly!":
$game_choices["fly_or_fireball"]=True # or 1 or "Fly"
"I'm flying."
"Fireballs!":
$game_choices["fly_or_fireball"]=False # or 2 or "Fireballs"
"I have fireballs."
I wouldn't recommend sending every choice made to server, as it could distort statistics, better send only after game is finished, right before or along with request for global statistics.
Plus you may include to sent data some game id, generated at start of game random number, so you don't include same game statistics multiple times if player reloaded.
Tricky part will be communicating with server without lagging game.
For server i recommend
https://pythonanywhere.com - it's free and simple to use.