URL of experiment:
https://run.pavlovia.org/pmmacabulos/driving-sim/
- Currently users press A & D key to move car left and right.
- Pressing space bar does nothing in-game, but the timestamp of when you hit space is saved to a CSV file.
Description of the problem:
i’m creating a driving simulator videogame from scratch using JavaScript/html for my PhD (I.e. not using builder). I want Pavlovia to host this experiment, and also save any data from it into a CSV file that I can access under the data tab.
I’ve been able to get Pavlovia to host the experiment using this helpful thread: Use Javascript task on Pavlovia
However I cannot figure out how to get Pavlovia to save any experiment data into a CSV file that I can store/access in my account.
For example, I want to create a csv file that stores the timestamp of every time a user presses the space bar in the experiment. So far, I can code this in JavaScript and i’ve created button that downloads a csv file of this data locally to your computer. But how would I get this csv file to be stored/accessed on my Pavlovia account instead? Kind of like how it automatically generates one for your PsychoPy experiments?
Any help would be sincerely appreciated!
I’d love to know what code I need to add to my experiment to translate it into something Pavlovia can work with.
Note:
I’m used to creating experiments with PsychoPy/builder and I’m a newbie coder in JavaScript/html. I kinda know that Pavlovia uses jsPsych to handle data saving, but I’m lost on the specifics of how this works