Collecting stats in GS game

LokitoesLokitoes Member, PRO Posts: 187

Hi all,

I'm hoping to be able to collect stats on the number of clicks a user has made on the screen within a game. This would be as a log for me as the developer to keep, not a public facing click counter. I'm sure there is a simple way to count clicks but I've never had to do it before - what would be the best way to get started?

For context: this would not be a game that people download to their own devices, it would be set up on my device for them to use. So the log doesn't have to be sent anywhere, just perhaps held in the background somehow.

Problem is that it needs to accumulate over time rather than refreshing with each use, OR needs to save somewhere before it refreshes - so that I can keep a running count. Is this possible?

Cheers!

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited August 2019

    You can have a rule that increases a game attribute by one each time the mouse is down. Save and Load that attribute and it will always be available and will continue to increase without ever resetting (unless you tell it to).

    As for viewing the value, you could make a separate scene that has a Display Text actor and maybe a password to access that scene. Or else just a rule in an actor (say the pause button) in the main scene that says something like:

    When Mouse is Down
         Change attribute game.clickCount to game.clickCount+1
         Timer after 5 seconds
              Display Text [game.clickCount]

    It's unlikely anyone will decide to hold down the pause button for a full 5 seconds, for example.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • bob loblawbob loblaw Member, PRO Posts: 793

    i think he’s saying he wants to see the clicks of others (that’s how i read it). i don’t think gs has a function that will send data.

  • bob loblawbob loblaw Member, PRO Posts: 793
    edited August 2019

    @Lokitoes, having a read through this thread just now:

    https://forums.gamesalad.com/discussion/97487/current-server-options-august-2019

    i got the impression that maybe that might be something along the lines of what you were after.

  • adent42adent42 Key Master, Head Chef, Executive Chef, Member, PRO Posts: 3,172

    Aside from saving it in-app and then grabbing the app and looking at an "admin" screen later to see the click (using the logic by @tatiang), you could store the clicks to a table and send them to a server via the Network Send Table To URL behavior.

  • LokitoesLokitoes Member, PRO Posts: 187

    Thanks guys (sorry for slow response) this works well.

  • LokitoesLokitoes Member, PRO Posts: 187

    @adent42 said:
    Aside from saving it in-app and then grabbing the app and looking at an "admin" screen later to see the click (using the logic by @tatiang), you could store the clicks to a table and send them to a server via the Network Send Table To URL behavior.

    Hey adent42,

    Isn't the Send Table to URL behavior no longer working? I can't see it in my behaviours list anymore (though I am on an edu license... not sure if this makes a difference).

    Is it only possible to do this via a third party app now?

    Thank you!

Sign In or Register to comment.