Keola Melhorn avatar image
Keola Melhorn asked

I'm building a large scale Space MMO, need help on how to handle custom weapons and ship/base configs.

So, I was thinking cloud scripts. However, I don't know if there is something more specialized or not. these are all player by player specific, basically, the player crafts ship parts and modules in the worklab and you get lucky or unlucky(mostly effected by skills which are already saved in player statistics.)

I'm using player data, to log upgrade start and end times, and to handle ulong string that identifies the "basic" information of a players base at a particular planet. I.E.(SBHT1L1WLT1L1TRT1L1RLT1L1) => which in long format is, small base hanger type 1 level 1 work lab type 1 level 1 etc. This issue is, this formatting limits me to single digits and doesnt allow me to use floats for weapon types that might have 1.2 modifiers based on your energy weapons skill etc. Will cloud script work for this? Also, examples. It has taken me a long time to figure out player data because the documentation is kind of poor tbh.. Since this is waayyy more complicated I'd like an answer n what feature would be best at handling this AND an example of how I'd set this data and get it, example of my player statistic data grab, down below so, you know how i index through my skills items (useful if you want to give me a constructor example.)

Player Data
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

Sarah Zhang avatar image
Sarah Zhang answered

For clarification, Player Data support setting a value as a float number. You can check the documentation - to learn about how to use the Player Data to handle the player's information. If you need to store the data that players can read but can't write, you can refer to this sample - to set it on CloudScript. Then you can follow this documentation – to get the player read-only data in the Unity client.

What you use in the screenshot you provide is Player Statistics. We would suggest you only store the values that need to be ranked as player statistics. Please check our documentation - for more information about player statistics.

10 |1200

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

Keola Melhorn avatar image Keola Melhorn commented ·

yeah, after more research, i decided to not use plafab after reading through your limits tab, even when you make people pay you don't offer support for custom tables. Sad, I'll be going with AWS aurora because I can write whatever custom tables I want.

0 Likes 0 ·
Clayton H. avatar image Clayton H. Keola Melhorn commented ·

One thing you could do actually is use "Cloud Functions". PlayFab advertises using an "Azure Functions App" to provide custom functionality to your PlayFab title, but you can basically set up your own Web API (it can be any HTTP/HTTPS REST Api that you make yourself or even another game service that you are also using). Then you use your cloud provider to make a database.

Here's the thing: You want to use AWS Aurora. That is fine, but Aurora is just a database provider. If you find yourself wanting the other services PlayFab provides, just use PlayFab + REST API + your choice of database.

Personally, I use PlayFab + Azure Functions App + Azure Resources (Redis cache, db, etc).
If you wish to use AWS, you can use PlayFab + AWS API Gateway + Lambda + Aurora. If you don't want to use a Lambda function + API Gateway, you could just make your own REST API with something like Spring Boot or other flavor of library and language and host it somewhere on AWS or Azure.

Just make sure you host your stuff in the West US region whether it's AWS or Azure that you choose to use. This is because PlayFab's systems are in that region, so you get minimal latency between PlayFab and your REST API.

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.