(maybe fixed?) Critters dodging through projectiles

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

(maybe fixed?) Critters dodging through projectiles

Post by kaypy »

There's a glitch where I'm not 100% sure whether its a bug or some 'compatibility with the original' thing...

Occasionally, a critter will move toward the party at the same time as you are firing a projectile at it. If the timing is right (wrong?) the critter can move forward at the same time as the projectile moves into the critter's old tile, so they trade places without interacting.

Having the critters dodge around the projectiles is cruel but fair, having them dodge through the projectiles seems to me to be going too far 8-)
Friends don't let friends eat worm round
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (cannot reproduce) Critters dodging through projectiles

Post by Sophia »

I can't reproduce this. The code includes checks to prevent that from happening, and I've run a few (admittedly simple) tests and it has always worked fine.
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (cannot reproduce) Critters dodging through projectiles

Post by kaypy »

By 'occasionally' I think I saw it less than a dozen times over a neophyte to um-master ninja length game... Yeah that's not going to be easily reproducible...

I'll bring it up again if I can figure out a way to reproduce it, otherwise lets ignore it.
Friends don't let friends eat worm round
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (cannot reproduce) Critters dodging through projectiles

Post by kaypy »

I'm guessing a save immediately after a dodge-through isn't any good, right?

Image

Worms take up the whole passage which is straight for 3 tiles- nowhere to dodge. A projectile went through them and is now lodged in the flying eye...

This image (and the save) are after I retreated up the passage a bit and just before I realize I'm standing on a trapped tile.
Friends don't let friends eat worm round
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (maybe fixed?) Critters dodging through projectiles

Post by Sophia »

Not really, but having a definite situation where it took place is a lot better than just "occasionally this happens."

When this happened, do you happen to recall, was it because the worms were facing sideways and they rotated at the same time as they moved? I was able to reproduce the error in that situation, so it'd make me pretty happy if that's the problem. :mrgreen:
(Regardless, I'll fix the bug there...)
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (maybe fixed?) Critters dodging through projectiles

Post by kaypy »

I'm pretty sure they were already facing me by the time this happened. At very least they had to be far enough up the passage that the eye got in behind them to get hit. I think that they moved toward me at the critical stage, but that may have just been then generally advancing while I generally retreated.

Image

It could still be that the do-something-odd-to-catch-the-player-off-guard AI had them turn for a fraction of a second at the critical moment...
Sophia wrote:I was able to reproduce the error in that situation, so it'd make me pretty happy if that's the problem. :mrgreen:
That's impressive- it took 9 levels of dungeon (plus whatever was left of the previous playthrough) for it to recur for me...
Friends don't let friends eat worm round
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (maybe fixed?) Critters dodging through projectiles

Post by kaypy »

Just got another one.

This was a zytax, so it is a no-facing critter. It had, however, *just* come around a corner, so the facing-change may well still apply.
Friends don't let friends eat worm round
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (maybe fixed?) Critters dodging through projectiles

Post by Sophia »

Hey, projectiles are supposed to pass through them... :? :shock:

Unfortunately, the issue I found was related only to size 2 monsters, so that's less encouraging.
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (maybe fixed?) Critters dodging through projectiles

Post by kaypy »

That depends on whether the projectile in question happens to be a desew spell 8-)
Friends don't let friends eat worm round
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (maybe fixed?) Critters dodging through projectiles

Post by kaypy »

A pair of viper demons. Straight passage, no obvious sidestep possibilities. (Theoretically one could move behind the other, but I didn't see that happen- the pair just moved forward)

I did two melee attacks, two thrown slayers, then stepped back. The demons stepped forward and the second slayer wound up at the end of the passage. (I was surprised at this one as it was pretty much point blank range, although I cannot rule out that I might have hit back before the second throw action)
Friends don't let friends eat worm round
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (maybe fixed?) Critters dodging through projectiles

Post by Sophia »

I think I know what's going on. The "point blank range" was actually a big clue and it might be the key to all of it.

Here's what I think is going on:

You throw a projectile. Its "openshot" flag is set, which turns off collision detection, to prevent it from smacking into you immediately. Since the projectile was just thrown, its timer goes into the list of timers after any existing monsters. Right after throwing the projectile, you back up, which causes the engine to immediately process a tick, because DSB does that just like DM. The monsters' timer runs, they get a turn this tick, so they step forward. The arrow's timer now runs. It advances without collision detection and clears its "openshot" flag-- and passes right through the monster that stepped forward into it.
kaypy
Artisan
Posts: 171
Joined: Sun Jan 19, 2014 7:11 am

Re: (maybe fixed?) Critters dodging through projectiles

Post by kaypy »

It's probably also worth nothing that since monsters dodge if given any chance, its actually my normal tactic to use missiles as "backline-melee" and then retreat.

I'm not sure this explains *all* the incidents I have seen, but I cant rule out any particular instance without watching for it at the time. And since I've finished my most recent playthrough, that may not happen for a while...
Friends don't let friends eat worm round
Post Reply