Just a stupid question, can you only place a new building inside existing territory or anywhere on the map?
is the square of the territory equal to the distance between nodes?
Just a stupid question, can you only place a new building inside existing territory or anywhere on the map?
is the square of the territory equal to the distance between nodes?
You can only place buildings on one of your available nodes (essentially your territory minus any nodes already occupied by buildings or resources) - this is given as part of your state update. And the territory square determines the size of the buildings territory as xmin = node.x - square
, xmax = node .x + square
, ymin = node.y - square
, ymax = node.y + square
- so a square of 1 means all the immediate nodes surrounding the building are covered.
awesome thanx so building rows of buildings it is,. Thank you, will probably only have a weak builder for this phase, but hope it will be enough to not be last
Good luck, PS just in case I wasn’t clear the corner nodes are also covered around the buildings, not just its sides so it forms a square of territory like so:
[ ][ ][ ][ ][ ]
[ ][X][X][X][ ]
[ ][X][B][X][ ]
[ ][X][X][X][ ]
[ ][ ][ ][ ][ ]
Another question, are there a limit to number of buildings you can have?
Not that I’m aware of no, but since the building costs increase each time you place a building there is an implicit limit at some point where you won’t have enough resources left to be able to place any more buildings
Weird, im limited to 6 buildings, then it just throws invalid action when using the available nodes in world map data… do we get the latest cost back in the gamestate? Or are there some math to work it out
Hmmm I havent come across this myself, maybe make use of the AvailableNodes in your bot’s state instead of the world’s state
Maybe i didnt look atvthe available nodes properly and trying to build on the same nodes. Midnight oil is burning quite dim at the moment
I would but some reason all the guids lists is just null so im using world state
Haha understandable , let me know if you need a rubber duck to help you debug , can whatsapp or something
Hahahaha, will do, this form was already a rubber duck, as i pressed the reply button I realized the issue.
Will get it working tonight, just need to figure out the cost calculations
Great stuff!
You should be able to find the calculations in the engine, I think its something like (but please confirm yourself) :
var total = (buildingCount * cost) / 2;
Full calculation is base cost
+ 0.5 * existing buildings * base cost
- have a look at https://github.com/EntelectChallenge/2022-Arctica/blob/25308962439f385c02e04489d3607fff34c54a62/game-engine/Engine/Handlers/Actions/BuildActionHandler.cs#L119-L135 for the details
Nice thank you saving me 5 minutes of sleep tonight
Yes, around 250
With 250 buildings you can basically fill the whole map’s territory.
But its most likely a suicide move anyways.
Hahahahahahaha, I want the real suicide squad