Global stats at end of game
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Global stats at end of game
Is it possible to get a percentage stats of how many players chose certain choices in your game? Like a Telltale game sort of deal. At the end of my game I wanna have a stats screen that says like "you and 54% of players did this" you know what I mean?
Re: Global stats at end of game
You can either add $choices_done["choice_431_a"]=True to menu choice or rework choice screen so it updated automatically. Then periodically sync choices_done with your server stats.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350
Re: Global stats at end of game
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.
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.
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."
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.
I may be available for hire, check my thread: viewtopic.php?f=66&t=51350
-
- Regular
- Posts: 71
- Joined: Sat Aug 13, 2011 9:07 pm
- Projects: Assess K, Mizuchi
- Organization: Aikasa Collective, Altabe Studio
- itch: aikasacolle
- Location: Southern California
- Contact:
Re: Global stats at end of game
This might be an old thread, but thought it might be worth mentioning for future searches:
viewtopic.php?f=4&t=39864#p424833
viewtopic.php?f=4&t=39864#p424833
Assess K (VN Adventure Game) LSF Thread | Mizuchi (GxG VN) LSF Thread | Honest Critique
[Proofreader, Beta-Tester]
Razz Art Visual - Starlight Vega [Co-writer]
Roseverte - Cafe-0, Duplicity, East Tower, How to Take Off Your Mask; Bakufu - Love Sniper
Zeiva Inc. - Train of Afterlife, OASE, X-Note, Area-X, Voices from the Sea, Natural - Beyond Nature, Dragon Essence, Anicon - Cat
Who is online
Users browsing this forum: No registered users