I need to learn about reading and writing text files over the internet, and I’m so naive about doing things over the internet that I don’t even know the correct terminology to begin searching. The game is ready, except for this final piece.
I have a game that will be running in players’ web browsers. Below is a summary of what I need to accomplish.
My game will need to read a Parameter text file containing parameters that define the events of different experiments. (the game is for research)
I need to maintain a Log file that keeps count of how many times each different experiment within the Parameter file has been run. Ideally the parameters are a separate text file and not embedded in the program so that they can be modified easily.
A: How do I get the Parameter file data to the program that is loaded and running in the player’s browser?
B: Once the program finishes the experiment, how would I update the log file, and do so safely given that it is possible (but unlikely) that different people’s computers could be trying to update the log file at the same time?
Specific examples would be marvelous, but I’d also be very happy with just some direction as to the methods I need to be investigating.
Usually you’d do this kind of thing with an online database instead of a text file. Writing text files directly over the internet on a remote server isn’t really a thing, outside of a proprietary cloud drive system like Drop Box or connecting interactively to a remote server via SSH. But I don’t think a WebGL app can actually do either.
As for a database, a PHP/MySQL server is the usual low cost route, since the software itself is free and powerful and you can test it at home before committing to renting a cloud server to host it. You’d communicate to the server via UnityWebRequest.
uggghh… thanks. I was afraid of that. I guess its time I figured MySQL out & the uni I work for will provide me the server space. Thanks for the grounding.