Page 1 of 1

Author tracking Game Data

Posted: Thu Jul 12, 2018 4:53 pm
by The33rdBandit
Hello,

This is my first time posting, so if this at all the wrong location please let me know and I'll delete the thread and move to the proper location.

I'm currently planning out the scope of my project so I'm investigating if different things are possible or not (both at all or within my means). I'm planning on releasing my VN in smaller chapters at a consistent pace (lets say once a month or so.)

Now - I'd like to offer choices that don't have any immediate impact, but will inform me as the author of different choices the readers have made so that I can adapt the future released based on those choices.

Is it at all possible to receive data based on user input? How would I go about this?

Thanks for the help in advance :)

Re: Author tracking Game Data

Posted: Wed Jul 18, 2018 12:28 am
by Dsiak
Interesting idea.

Now I far as I researched, RenPy can not be easily ported to play online in a web browser, so the easy solution of having a webpage send it to you might not be so straightforward.

The way I would go about it: create a very basic class that contains whatever you wish to know about the game and have your game upload it somewhere. While I have not done such a thing with Python, I believe it will be very similar to other languages, it should be something like:

Code: Select all

DataToTxt:
    readable_text = "First choice was:"+choice_1_flag +
    "Itens found: "+len(items_list)
    ...
UploadTxt:
    temporary_file = NamedTemporaryFile [DataToText(), (preferably)Unique Name for this Player]
    Function From API That Uploads (temporary_file, my_cloud)
The hard part will be to:
  • Find a suitable API
  • Bundle it with Python
So I recommend not to be toooo creative with how you will upload it, using an API for google drive or git will get the job done and you won't have to deal with all the headache that is getting permission for your package to get past the firewall. Plus they (should) have very solid documentation for both uploading and bundling.

Re: Author tracking Game Data

Posted: Wed Jul 18, 2018 5:19 am
by xavimat
Two examples in this thread: viewtopic.php?f=8&t=47568

Renpy can import urllib2 to send/receive data to/from a web server (I use a php page and a MySQL database there).
You could use also the "requests" module, but you need to include the module in your game. PyTom made an example here: https://www.patreon.com/posts/news-from-your-15636026