Sign In Register

How can we help you today?

Start a new topic
Answered

Getting Started

Hey guys - I'm brand new to the platform and hoping someone can give me a simple (like one sentence is fine) summary of which elements of the platform I should look at to implement the following.


Initially, I'd like to simply have my game report to the server any time someone completes the game. It will send their total play time through, their average character level, etc and I'd like to store that in a database that I can report on later.


Additionally, on the final screen of the game, I'd like to retrieve an aggregate sum of the count of existing entries, in order to display a message along the lines of "Congratulations, you are the 17th person to complete the game".


So what I'm after is something like "You'll need to configure an event, and attach some cloud code, that writes a database record, and you'll also create a report" - or whatever, just to give me an idea of what areas to focus on. I'm just having trouble piecing together the components based on what I'm seeing in the interface and doco.


Thanks!


Best Answer

HI Steve, It looks like you answered your own question! You will need to create an event, lets say called "completedGame" it will take parameters that your game will give it, Such as "totalTime" which would be a num....and in the cloud code for completedGame, you would update the player collection with this information.

Same thing with all the other events: The game's code sends, for example, a LogEventRequest to the event in gamesparks with parameters that the event is expecting, and the cloud code does whatever you need it to do (write or get data from a collection). Hope this helps.


Answer

HI Steve, It looks like you answered your own question! You will need to create an event, lets say called "completedGame" it will take parameters that your game will give it, Such as "totalTime" which would be a num....and in the cloud code for completedGame, you would update the player collection with this information.

Same thing with all the other events: The game's code sends, for example, a LogEventRequest to the event in gamesparks with parameters that the event is expecting, and the cloud code does whatever you need it to do (write or get data from a collection). Hope this helps.

Great - thanks for the detailed response. Good to know I'm on the right track before I dive in too deep.

Hi Steve,


Maria has given you a very useful response here. You could also use a leaderboard to store the data for when a user completes a game. To do this you would set up an event and create attributes for the data you wish to pass through the event, total play time, character level etc... I'd also recommend having a look through our Getting Started Guide which is located here, it will help you get up and running much quicker. Once you have gone through that and got to grips with the basics of the platform we can address any further questions you may have. 


Thanks,

Liam



Login to post a comment