Sign In Register

How can we help you today?

Start a new topic

Grid for buildings


I have some problem :(

I need to make grid for buildings.

Buildings will have different size, for example (1 x 1), (2 x 2), (3 x 2), (4 x 5), etc.

I do not know how much traffic I can use on GameSparks.

It my first online game, and I can not be sure about my backend optimization.

If i will write grid in mongoDB it cost ~ 30 KB per Player.

This is normal?

Or I can write buildingId and coordinates, but I will need check free space before I place building.

Or use .bin?

How to do it in another way?

Sorry for my English

Thanks in advance :)


Hi Romka,

This would be possible, however this would be determined on a case by case basis. If you'd like I can put you in contact with a member of our Sales department, from their we can work out SLA that would hopefully suit your needs.

I hope this helps, kind regards,

 - Steve

Thanks, Steve

Maybe it will work :)

Can GameSparks provide more than 5,000 api requests?

If yes, how much?

How will the price change?

Hi Romka,

Yes I can see how this would be difficult to optimize from a backend point of view, each time a player decides to interact with another directly this will cause an increase in the API call count. One solution here might be to have this as part of the game mechanic, so for instance a single player may only be able to perform so many of these transactions in a given period, do you think this would suit your requirements? I hope this helps.

Kind regards,
 - Steve


Thanks, Steve

Well, I can optimize the production of resources in the building.

Just wait production end in game, and send request when production complete.

But how I can optimization Players Market, I do not know when a player decides to sell or buy something from another player. I must check this many times.

How best to implement this?

Hi Romka,

Yes you are correct, a LogEvent will count as an API Request. How you would structure your API calls would be heavily dependent upon your exact game use case. It might be worth examining when exactly you will need all this information for example if only so many building are visible to the user would it be better to return this data in a single request rather than multiple much smaller ones? Would it be worth caching this data once it is received and only allowing a follow up request after so much time has passed? Mainly what you're looking for is ways of narrowing down the amount of requests to as few as possible and only transmitting exactly what is necessary.

To the best of my knowledge this is given in bytes. I hope this helps.

Kind regards,
 - Steve


Thanks, Steve

I'm worried about the API Requests: 5,000 per MAU.

LogEvent is that Api Request?

I was thinking about asking for information about a particular building, moving it if necessary, etc.

I wanted to realize this so the player clicks on the building and the game sends a request to the server, the server checks the information about the building's production and the end time, etc. , and then returns this information.

I think the requests and responses will not be too big, but there will be a lot of them.

Also when players will trade resources among themselves.

Have to constantly update The information of the slot if it is sold.

So there are a lot of queries.

What about It?

And last (very stupid question). :)

In NoSQL when I request collection stats, size is it bytes or bits?

Hi Romka,

Have you had a chance to take a look at our fair usage and system limits documentation, I've linked both of these here ( and here (

30 KB per player would seem like a reasonable amount, however what might impact performance here is how you are going about querying this data. You might have a look at our documentation here ( this will explain the basic principals behind indexing a custom collection. I hope this helps.

Kind regards,
 - Steve


Login to post a comment