Krastorio 2


An overhaul mod focusing on end-game technologies and moderately increased complexity.

Overhaul
10 days ago
0.18 - 1.1
308K
Transportation Logistics Trains Combat Armor Mining Fluids Logistic network Manufacturing Power Storage

i [Rejected] Creep Despawm

4 years ago
(updated 4 years ago)

Hi,

it whould be nice, if the creep will slowly despawn after killing the biters nest.
Like the Zerg-Creep in SC2.

Thanks
Typhon

4 years ago

^

Linver β˜†
4 years ago

This mean test for each creep (or group of tiles), if their related nests still alive for an interval until they are killed.
When the nest are many this will have an impact of the game performance (UPS).

Also, is not clear with what speed should despawn, if isn't instant will consume more UPS, if is instant will make difficult collect creep.

I'm sorry.

4 years ago

Why not add a timer to creep entity link to a nest when a nest die ? If no other nest is detected while iterating on the creep add the dead timer ? That what you do for the virus capsule I think. But yeah that quite a heavy option maybe as a parameter.

Linver β˜†
4 years ago

What I do in the virsues is use a random approach, so pick "one of possible tiles", "process this order" should have the same consume that is sort of 0.030 millisecons, aren't much but are something, anyway the problem of second point is less relevant than the first one, u don't know how much is heavy call in the game the function "find_for_entities_filtered(...)"; on a small area take a sort of 0.010-0.050 milliseconds, on a medium area 0.050-0.100, on a big 0.300-0.500, so is not difficult have a map with 30'000 where something like 5'000+ have nests inside, imagine the best case where: use 0.010*5'000 each... 60 tick(1 second)? Or 120 tick? Think about that game start lag a bit when a mod use 2.000 milliseconds...

If u are able to show me an implementation that is very light, I will think about add it, for know I see only much lag in the end game = blame on me.

3 years ago
(updated 3 years ago)

could you introduce a method as part of the creep tile class that not only makes it kill a current instance (after a timer) but also makes it look at it's directly surrounding tiles for more creep and call the same method? this would make it propagate the deletion of creep automatically. the destruction of a biter nest would only need to kickstart the process on a single underlying instance. you would only need to either make sure that the biter nest is the last one in a biter base, or also make the abovementioned method check that no nearby nests exist.
thanks to a delay between the calling of this method on instance A and it itself calling the same method on surrounding creep tiles it should also be very light on performance. this assumes that each instance of a creep tile knows its own location, which I kinda assume it should.

I'm assuming you can make the tiles run code like an entity because they slow down the player. if they can't run code at all, never mind.