question

Jacques Leemans avatar image
Jacques Leemans asked

base building data structure

Hi Everyone,

New to PlayFab, Im currently working on a base building game, with custom server (PHP/MySQL). Evaluating if I can move the game over to PlayFab.

Some questions:

We have about 17 buildings, which the user can unlock, buy, place, move, rotate, upgrade, etc...

What would be the best way to update a user building? Currently I have a catalogue with a few buildings, with custom KVP.

can I change the custom data on the building for the current player only? eg: position or rotation?

Thanks,

Jacques

,

Hi,

Im new to PlayFab, but Im a Full Stack game developer, been using unity since ver 3, also do NodeJS/PHP for server side.

Has anyone used PlayFab for a RTS type game, eg: clash of clans, particularly the base building side.

So far, this is my thinking:

Virtual item for each building.

The user can update its position, rotation and upgrade the building (if some validations).

how would I save the buildings instance per user?

Thanks,

Jacques

Player DataPlayer Inventory
10 |1200

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

brendan avatar image
brendan answered

We actually have a few folks doing city/base building games in the service. There are a few ways to approach this, depending on your requirements. In many cases, developers are simply writing the information on buildings in progress to User Read Only Data, and using Cloud Script to update the time remaining for the build process per structure. Alternately, yes, the CustomData you set on an item instance in the player inventory is unique not just to the player, but to that specific item instance (the Catalog level CustomData is just meant for configuration data that's global to the game), so that would be another possible way to manage this.

10 |1200

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

Jacques Leemans avatar image
Jacques Leemans answered

Thanks @Brendan, the second options works perfectly!

10 |1200

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

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.