question

Ryan Courtade avatar image
Ryan Courtade asked

Very large scale dynamic map,State Of Survival Style strategy game implementation

State of survival is a large scale strategy game which has a very big map (Called wilderness) full of online player's settlements.

What I want to replicate for our game are large city maps (Think 2000 X 2000 Tiles). Inside each of these city maps, online players will have their own headquarter building placed. Besides these player buildings, these city maps will also have other types of objects placed on it, such as resource tiles (Food, Lumber, etc.) (Which any player can consume, once a player consumes, the tile's gone and noone else sees it).

I've estimated the total number of objects possible at any given time to be around 15K in one city map.

Now the game has a world map, which is made of up hundreds of such city maps (Think continents on the earth's world map).

Once a city map fills up with enough player buildings (3000 or so), all new online players will start spawning in another city map which is emptier. For this, I'm thinking I'll keep a simple title data which keeps track of the current city number where a newly joined player will first spawn.

Because this game is going to be ultra large scale with millions of players accessing common maps and objects with time (With players having attack and defense abilities ofcourse), I assume the title data/CDN is not a good place for say setting up a JSON full of co-ordinates of these buildings, as I assume even keeping a cloud script to check the JSON will still easily hit API call limits as at any given point a 100/1000/10000 players would read/write to the same JSON, causing problems.

So far I've setup player resources with a cloudscript and internal player data for security and that works well, but moving ahead with the map implementation seems to be a challenge.

Should I look at AWS DynamoDB for storing such large datasets which can be accessed by millions at the same time (Read and write)? Can I use DynamoDB with playfab cloudscripts to let all object locations sync up between all these players easily?

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

·
Seth Du avatar image
Seth Du answered

Based on your description, there are 2 fundamental features in your game – Multiple reads/writes at a short time; large storage and customized database. It seems to be necessary to have an external database that supports queued tasks and custom query, while PlayFab doesn’t support a shared resource that can be written by multiple players at the same time. Cloud Script is based on Google JavaScript V8 Engine, which doesn’t support importing external libraries and you may need to construct low-level http API in your code. However, it is recommended to use Azure Function, and you are able to implement DynamoDB in C# environment. Additionally, it will be more convenient to use Azure Cosmos DB with Azure Function. We suggest you compare multiple solutions on the market.

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.