View Issue Details

IDProjectCategoryLast Update
0020856AI War 2Bug - GameplayJan 16, 2020 12:02 pm
ReporterAnnoyingOrange Assigned ToChris_McElligottPark  
Severitymajor 
Status resolvedResolutionfixed 
Product Version0.809 Divide By Human 
Fixed in Version1.302 Frigate Empowerment 
Summary0020856: Units warping past static forcefields
DescriptionWhen running the game at high speed (x10 in this example), some units manage to go into a wormhole when said wormhole is still covered by a static forcefield.
Judging by the affected unit's movement, forcefield blocking seems to first let the unit move, and after the movement is complete push it back if the unit would end up inside the forcefield: it seems the check for wormhole interactions is performed in between those two checks, leading to the issue described.
I have attached a save file with perfect conditions to observe the issue: zoom into the planet Vitali (near the middle of the map), notice the 50 vampire claws humping the full health forcefield, set the game speed to max, unpause, and watch as they go through it to pop up on Dilawa, where they repeat the same process.
I rated the issue as major severity as it breaks the game rules in an extremely noticeable fashion, feel free to let me know if that's not the intended use.
TagsNo tags attached.

Activities

AnnoyingOrange

Dec 21, 2018 5:17 am

reporter  

Forcefield Bug.save (1,228,405 bytes)

AnnoyingOrange

Mar 11, 2019 1:24 pm

reporter   ~0050969

Can confirm that the issue persists in 0.816

AnnoyingOrange

Mar 12, 2019 6:50 am

reporter   ~0050974

After some more testing, I can say that the issue seems to affect decloakers and tractor beams too, and starts appearing with some consistency at x4 speed.

BadgerBadger

Mar 12, 2019 9:42 am

manager   ~0050977

So what I think is happening is this. Every Sim-Step a unit will move "So much". If it's close enough to the wormhole it will then jump through.
Shields work by preventing units from getting close to the wormhole. However, when you turn the game speed up enough then the distance a unit can move in "one step" can be > the shield radius, so we wind up missing the ability of the Shield to prevent the ship from getting close to the wormhole.

This is a bit of conjecture, because I'm having trouble figuring out exactly how this is calculated.

AnnoyingOrange

Mar 12, 2019 12:49 pm

reporter   ~0050978

If that's the way shield collisions are calculated, would it be possible to check for "is the destination inside a shield/other forbidden area" before validating a move?
It should have a lower performance cost than splitting up individual steps a la Super Mario 64, and it should guarantee correct behaviour.
On the other hand, it would do nothing to prevent the bug for tractor beams and other non-blocking units.

AnnoyingOrange

Jul 4, 2019 2:55 pm

reporter   ~0052039

Issue is still there in 0.872.
Not even MK7 forcefields are wide enough to consistently stop the warping, it seems.

Chris_McElligottPark

Jul 4, 2019 3:54 pm

administrator   ~0052043

Definitely understood, and Badger's note on why it is happening is correct. The solution for us is basically to make it so that we calculate "is this wormhole touched by any forcefields" every sim step, and then when units want to go through a wormhole (from the side the forcefields are on, if they are enemy to that forcefield), then they can't go through the wormhole but DO move to the position of the wormhole... which should immediately cause them to be pushed back in the same sim step, I think.

I think that's probably the simplest possible implementation of a fix. And given ship speeds can be quite high, there's nothing else that would definitely work without doing too many needless calculations.

RocketAssistedPuffin

Jan 16, 2020 12:02 pm

reporter   ~0055614

Was fixed recently.

Issue History

Date Modified Username Field Change
Dec 21, 2018 5:17 am AnnoyingOrange New Issue
Dec 21, 2018 5:17 am AnnoyingOrange File Added: Forcefield Bug.save
Dec 21, 2018 5:17 am AnnoyingOrange File Added: Forcefield Bug.savemet
Mar 11, 2019 1:24 pm AnnoyingOrange Note Added: 0050969
Mar 12, 2019 6:50 am AnnoyingOrange Note Added: 0050974
Mar 12, 2019 9:42 am BadgerBadger Note Added: 0050977
Mar 12, 2019 12:49 pm AnnoyingOrange Note Added: 0050978
Jul 4, 2019 2:55 pm AnnoyingOrange Note Added: 0052039
Jul 4, 2019 3:54 pm Chris_McElligottPark Note Added: 0052043
Jan 16, 2020 12:02 pm RocketAssistedPuffin Assigned To => Chris_McElligottPark
Jan 16, 2020 12:02 pm RocketAssistedPuffin Status new => resolved
Jan 16, 2020 12:02 pm RocketAssistedPuffin Resolution open => fixed
Jan 16, 2020 12:02 pm RocketAssistedPuffin Fixed in Version => 1.302 Frigate Empowerment
Jan 16, 2020 12:02 pm RocketAssistedPuffin Note Added: 0055614