Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

Gathering User Data with google scripts

A topic by 20potter created Mar 14, 2018 Views: 158 Replies: 7
Viewing posts 1 to 5

I am looking into gathering user data from a visual novel that I am working on. I think that some of the puzzle pieces are in place but there are some missing. The main game is written in godot 2.1, I have made a basic script on google scripts that puts a value into a google spreadsheet. Currently I am not sure how to fully connect the two. Also I am trying to limit how obvious the transfer is in order to avoid player confusion, so I would prefer if it happens without opening a window. I have attempted using a .URL file to access it with the .URL being opened with a .bat and the line updateSheet.URL "-quiet" "-nowindow" which would then be ran using a .vbs which can run the .bat without opening a command prompt. That would then be executed by godot, however the problem is the .bat doesn't hide the .URL , I  suspect it is because the url just opens a browser and the browser isn't being told to hide it's window. I also tried it with an html file. Also part of the problem  other then keeping things secret is actually getting the data to the google script. I've read somewhere that javascript which google script is based off of can not access local files without the user explicitly selecting the file for security reasons. So I am somewhat stuck on how to solve this problem. I suppose if it comes to it I could scrap the gathering of user data as nothing has been built in the main project for it.

Admin

It sounds like what you'll wan to do is make a HTTP request a remote server to send your data. I don't know enough about Godot to tell you how to specifically do it. Trying to do it with a bat or vbs file probably isn't the best idea, it might be picked up by a virus scanner as being suspicious.

I know avast doesn't detect it as such. Windows defender flags it when you open the bat directly but when the vbs opens the bat it doesn't have a problem with it. As for HTTP I have tried it somewhat but it confuses me. Also part of the reason I am attempting to do this through google scripts is due to the infinite space I get as long as it is in a google format. Although I think I might have been attempting to use the http client rather then request. Here is the documentation on both if you are curious http://docs.godotengine.org/en/2.1/classes/class_httpclient.html , http://docs.godotengine.org/en/2.1/classes/class_httprequest.html .

(+2)

Are you sure that gathering data without your players knowing about it is a good idea? As you are skilled in programming, why not add an interview form at the end of your game and ask them what they liked/disliked about it? I, as a player, would appreciate it more than you spying on me without my knowing.

(1 edit)

It isn't completely unmentioned, rather it would gather data that a form would have problems telling me. Such as what choices the player made throughout the game, how often the player reloaded to change their choice immediately after making a choice. I don't mind adding an opt in button. I just rather not break immersion or confuse a player when a new window suddenly pops up.

Thanks for your replay. Now I understand better, what you are trying to do. Good luck with the implementation!

Some progress has been made by looking through documentation. When making a google script into a google app you pass through a variable, looking into that variable it is an object that takes a query string from the url. So I should be able to through godot edit a .URL or a .html to send the info. Now I just need to find a way to hide it.

I figured out a way to do it by using wget as the middle ground with the exe ran by a batch. I am currently trying to make sure the licensening is not going to be problematic. I posted it as a question here if anyone is interested in following it https://itch.io/t/206461/using-gnu-in-project