PDA

View Full Version : Tunnellers breaching fortified walls?



AdamP
August 14th, 2016, 00:52
Has anyone else experienced this?

An imp is fortifying an earth tile, and on the other side there is a tunneller. You know it takes 2 digs to destroy an earth tile? If the tunneller does the first dig, and at that exact moment, the imp finishes fortifying, the wall will still be fortified, but it doesn't stop the tunneller digging through it. The tunneller will keep digging and breach the wall as if it was a hero fortified wall. This has happened to me at least twice.

I don't know if this is fixed in KeeperFX, nor do I know if this is the same issue reported here (https://github.com/dkfans/keeperfx/issues/721). This is something I've encountered in normal DK. I don't know if this also happens with imps and enemy Keepers.

YourMaster
August 14th, 2016, 08:48
I've never noticed the one you're describing, but it's not the same as this (https://github.com/dkfans/keeperfx/issues/721)issue no. That problem is only there in recent nightlies of KeeperFX, and it causes that eventually tunnelers just always will breach your walls, not just when you've just fortified it.

AdamP
August 18th, 2016, 04:10
If I ever notice this issue in KeeperFX, I'll be sure to report it.

AdamP
September 10th, 2016, 00:20
If I ever notice this issue in KeeperFX, I'll be sure to report it.

I was watching this KeeperFX YouTube video, and it so happens that this exact phenomenon happens at 4:13. I can't imagine it's by design.


https://www.youtube.com/watch?v=8E0KW-m0QEg

YourMaster
September 10th, 2016, 07:19
It is a recent video, and there's no way to tell which version the player is using,... so this may be the bug from the latest official nightly. Have you noticed this version (https://keeperklan.com/threads/5174-KeeperFX-Unofficial-0-4-6) where it shouldn't happen anymore.

But could indeed be a different one though. I'll try to see if I can reproduce it sometimes.

Woudo
September 10th, 2016, 16:06
I remember this bug from absolutely yonks ago, before I even knew what KFX was let alone had it installed.

I imagine there's an initial check for the tunneler to see if he's allowed to dig the wall and then no checks after that. I bet if the wall had infinite HP, the dude would just smack it forever.

YourMaster
September 10th, 2016, 22:09
I've tried, and indeed the tunneler checks if a tile can be breached before it starts to dig. If it is fortified in the meantime, the tile gets more health but the tunneler will finish digging it. I've raised an issue (https://github.com/dkfans/keeperfx/issues/758).

AdamP
September 11th, 2016, 04:02
It is a recent video, and there's no way to tell which version the player is using,... so this may be the bug from the latest official nightly. Have you noticed this version (https://keeperklan.com/threads/5174-KeeperFX-Unofficial-0-4-6) where it shouldn't happen anymore.

But could indeed be a different one though. I'll try to see if I can reproduce it sometimes.

I see you've raised an issue, but I was going to say that if you watch and listen closely, you'll see that the tunneller does indeed do a dig before the imp finishes fortifying, so this is definitely the issue I've described here, not the other one. It's extremely difficult to reproduce it because the timing has to be exact. The imp must finish fortifying at the exact moment between the two digs, and he does in this video.

YourMaster
September 11th, 2016, 07:31
Even if the imp finishes right before the digging the timing is still right. I've managed to get the timing right, made a small test map and gave the imp speed to help out.

AdamP
September 11th, 2016, 16:54
Even if the imp finishes right before the digging the timing is still right. I've managed to get the timing right, made a small test map and gave the imp speed to help out.

I see; the tunneller checks to see if he's allowed to dig before the process actually starts, but once started, there are no further checks to see if he's still allowed to dig. Therefore he carries on digging, because the process has actually already started by the time the imp finished fortifying.

I imagine there's a loop or something similar? If so, perhaps a solution could be to have him check before each iteration?

Woudo
September 11th, 2016, 17:26
I highly doubt there's a loop.

Tunneler reaches tile.
Can I dig this?
-- Yes.
Dig tile.
-- No.
Keep walking.

He's not checking if the tile is diggable after every smack.

It doesn't seem like it'd be a hard bug to fix, but it really depends on how the logic is written.

AdamP
September 11th, 2016, 18:34
I highly doubt there's a loop.

Tunneler reaches tile.
Can I dig this?
-- Yes.
Dig tile.
-- No.
Keep walking.

He's not checking if the tile is diggable after every smack.

It doesn't seem like it'd be a hard bug to fix, but it really depends on how the logic is written.

I can't see how else the digging routine would be implemented. The only way I can think of is a while loop, with the while condition being as long as the tile is flagged, and the routine is to keep digging. Fortification disallows the flagging of the tile, but doesn't unflag it if it's already flagged, at least for hero tunnellers, enabling them to dig through the fortified wall. Of course, I don't have access to the source code, so I'm only guessing.

YourMaster
September 11th, 2016, 19:09
I've actually looked at the tunneling code a while ago, and I could remembered, but I believe Woudo is right. Walls can be tunneled through,... but creatures refuse to tunnel through enemy walls. What does actually happen is to check the health of the slab on each action.