Optimizing Endeavors - Part 2
[p]Salutations, Colonisers!
[/p][p]In the last dev diary, we talked about teaching Coloniser what information to send to each player and just as importantly, what not to send.
[/p][p]But there’s another side to that problem.
[/p][p]Before the game can decide who should know something, it first has to answer a much simpler question: What’s actually nearby?
[/p][p]RTS games constantly ask questions like:[/p]
[/p][p]To fix this, we implemented a system called spatial partitioning.
[/p][p]Instead of treating the world as one giant list of entities, the game divides the map into smaller regions and keeps track of what’s where. That way, when a unit asks “what’s near me?”, the game only looks in nearby regions instead of scanning the entire world.
[/p][p]In Coloniser’s case, this means a query that used to check thousands of entities now typically checks a few dozen. Essentially, this means the same result, but radically less work on the processing side
[/p][p]Units in Coloniser are always moving, so the system needs to handle change efficiently.
[/p][p]To do that, we use a structure that allows entities to move slightly without constantly rebuilding the world layout. Units can reposition freely within their local area, and the system only updates things when it really needs to.[/p][p]
We also split the world logically:[/p]
[/p][p]Spatial partitioning helps the game find relevant entities quickly.
Interest Management decides which of those results are actually sent to each player.
[/p][p]This is where the two systems come together. Together, they allow Coloniser to run large battles efficiently, keep AI responsive, avoid unnecessary work and scale to bigger maps and player counts. Here is how the game behaves with spatial partitioning and interest management applied:[/p][previewyoutube][/previewyoutube][p]There are still some improvements we have to do in these two areas, but we are very close. And you know what’s cool about all this? These are all under the hood improvements. Aesthetically, you won’t see any change. However, you will feel it: smoother performance, fewer spikes, AI that keeps up even when things get chaotic.
[/p][p]And it gives us a much stronger foundation for everything that comes next. You’ll see this with your own eyes with the upcoming demo, but more on that soon. And if you want to try it even sooner, be sure to request the playtest on our store page.[/p][p][/p][p]We’re still not done with dev blogs, so stay tuned![/p][p][/p][p]Cantos Games[/p][p][/p][p]Discord Youtube Reddit X/Twitter Bluesky Instagram Facebook[/p]
[/p][p]In the last dev diary, we talked about teaching Coloniser what information to send to each player and just as importantly, what not to send.
[/p][p]But there’s another side to that problem.
[/p][p]Before the game can decide who should know something, it first has to answer a much simpler question: What’s actually nearby?
[/p][p]RTS games constantly ask questions like:[/p]
- [p]“Which enemies are within attack range?”[/p]
- [p]“What resources are close to this villager?”[/p]
- [p]“Who should this tower shoot at?”[/p]
[/p][p]To fix this, we implemented a system called spatial partitioning.
[/p][p]Instead of treating the world as one giant list of entities, the game divides the map into smaller regions and keeps track of what’s where. That way, when a unit asks “what’s near me?”, the game only looks in nearby regions instead of scanning the entire world.
[/p][p]In Coloniser’s case, this means a query that used to check thousands of entities now typically checks a few dozen. Essentially, this means the same result, but radically less work on the processing side
[/p][p]Units in Coloniser are always moving, so the system needs to handle change efficiently.
[/p][p]To do that, we use a structure that allows entities to move slightly without constantly rebuilding the world layout. Units can reposition freely within their local area, and the system only updates things when it really needs to.[/p][p]
We also split the world logically:[/p]
- [p]moving things like units and animals[/p]
- [p]mostly static things like buildings and resources[/p]
[/p][p]Spatial partitioning helps the game find relevant entities quickly.
Interest Management decides which of those results are actually sent to each player.
[/p][p]This is where the two systems come together. Together, they allow Coloniser to run large battles efficiently, keep AI responsive, avoid unnecessary work and scale to bigger maps and player counts. Here is how the game behaves with spatial partitioning and interest management applied:[/p][previewyoutube][/previewyoutube][p]There are still some improvements we have to do in these two areas, but we are very close. And you know what’s cool about all this? These are all under the hood improvements. Aesthetically, you won’t see any change. However, you will feel it: smoother performance, fewer spikes, AI that keeps up even when things get chaotic.
[/p][p]And it gives us a much stronger foundation for everything that comes next. You’ll see this with your own eyes with the upcoming demo, but more on that soon. And if you want to try it even sooner, be sure to request the playtest on our store page.[/p][p][/p][p]We’re still not done with dev blogs, so stay tuned![/p][p][/p][p]Cantos Games[/p][p][/p][p]Discord Youtube Reddit X/Twitter Bluesky Instagram Facebook[/p]