question

austerepeasant avatar image
austerepeasant asked

Retrieving one variable from all players

I am planning on running an automated tournament. To do that i need a way to collect player submissions to the tournament. Ideally i would like players to be able to modify their settings betweeen rounds, which means players would need access to their submissions.

So... is there a way to automate a search through all players' data and collect a single variable from each, if it exists? Other than looking through all players manually?

Otherwise, is there a system in place to collect player 'submissions?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

Could you describe your tournament from a gameplay perspective? A top-down approach is usually the best way to go in determining what the right technical approach will be for any given feature.

We specifically do not provide open query on data tables due to the fact that this is one of the most common ways titles run into issues at scale in online systems. And since by default titles are in our shared service (to minimize your costs, but private "verticals" are available under custom contracts), we cannot allow any one title to impact others. Instead, we provide a number of services which are all designed to scale to any number of users effectively. We've designed them to be as generic as possible, so there are a great many ways the service components can be used to create the experiences you need.

So depending on your requirements, we may be able to find a way for you to use existing components for your design. However, if you specifically need to aggregate some information across your users in real-time, and in a way that is not supported by our existing services (such as leaderboards), you can always use the PlayStream Webhooks to make calls to your own Web API-enabled server to get real-time events for your game.

9 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

austerepeasant avatar image austerepeasant commented ·

Nothing is realtime. Basically, a user will create a character and hit submit while submissions are open (2 days). Once the submission time is up i will collect all user submissions and simulate a round robin tournament where every character battles every other. I will fhen post the results of the round robin

Afterwards, top 16 characters will be placed in a tournament where 100 battles will be simulated each round. Top Players will be able to make minor changes to their characters, swapping in and out certain equipments, between rounds.

Technologies i already have, compress character into a short array thar can be imported or exported, and all simulation will happen in a separate application that i designed, which will either grab data automatically or accept copy and pasted data.

0 Likes 0 ·
brendan avatar image brendan austerepeasant commented ·

What is the "submission", exactly? One possibility would be to use our leaderboard system. We recently updated to return additional player profile data on the Server API call to get a leaderboard, which you can use to get additional info (other stats, player tags, etc.).

0 Likes 0 ·
austerepeasant avatar image austerepeasant commented ·

Well, i was hoping for the submission to be one single String of data. That way i could easily interpret it and pass it around my system as i see fit. I dont need anything fancy or complicated, just a way to collect a string of data.

0 Likes 0 ·
brendan avatar image brendan austerepeasant commented ·

Actually, player Tags are strings (up to 256 characters), so that would be an option if the leaderboard approach works. If not, I'd recommend using PlayStream to deliver the info to your system, either using the Webhooks or Event Archive approach.

0 Likes 0 ·
austerepeasant avatar image austerepeasant brendan commented ·

ok thanks Brendan... I'll look into both of those options.

0 Likes 0 ·
Show more comments
austerepeasant avatar image austerepeasant commented ·

Brendan: I have it working now that I can call a cloudscript to write a new variable in my 'Dummy' character with my Player name as the variable name and my character string (~250 to 350 characters) as the data. It would basically be a single call, per player, to this cloudscript to write to the character and never read. I will also limit each player to only being able to write once.

Do you see this 'exploit', being used in a limited context, as still being problematic? If so then it's back to the drawing board...

0 Likes 0 ·
brendan avatar image brendan austerepeasant commented ·

I'm sorry, but that's simply not going to work. For one thing, you have a limited number of keys to work with in player data, so what would happen is that once you hit that limit, no other players would get to write to it. But more to the point, you're attempting to write to a single player account, but from all players. That data service is not designed to work in that manner, and trying to use it that way could get your title blocked from the service if it causes a performance impact.

Again, I would recommend using one of the two methods I described above - using Tags and user segments, or using PlayStream webhooks or the event archive to aggregate the info you need.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.