SpaceCadetPinball icon indicating copy to clipboard operation
SpaceCadetPinball copied to clipboard

Collision bug suspected

Open dobragab opened this issue 3 years ago • 7 comments

Okay, I know that reports to this bug are suspicious. I think I have seen it 2-3 times, but I was never sure that this actually happened, or I wasn't looking close enough. I decided that if I see it clearly once more, I'll open an issue about it.

So, when the ball is moving fast, I mean really fast, after bouncing multiple times, it might fall through a flipper, without colliding. I've seen it happening with this very trajectory twice:

pinball_collision_bug

I aim the Hyperspace with the left flipper. I hit the wormhole opener, the ball bounces back to Flags Upgrader (or whatever that is) in a low angle, then bounces downwards to the right bumper. For some reason, the ball is surprisingly fast, and I react late, and I fire the right flipper approximately the same time when it's about to hit the ball. Then the ball just falls without any sorts of collision happening.

I'm using the Full Tilt graphics, if this matters.

I have no idea how to repro this. Probably a carefully set up Demo Game could help. From this time on, when I'm playing on my personal computer, I'll record all my games and hope to catch it..

dobragab avatar Jan 20 '22 13:01 dobragab

I think this is caused by flipper collision moving behind a fast-approaching ball. My flipper code is fairly accurate, so this bug is probably from the original 3DPB. Of course, it just as well could be my decompilation fault.

If it is from the original, then I probably won’t act if it is rare. FT might contain better flipper code; I might incorporate some of it, if I ever decompile it.

FT data should have no impact, it is still 3DPB under the hood. I thought the x64 floating point bug involves flipper collision not working at all, not just in edge case.

As a first step, I would like to find out if this is my bug or original bug. Easiest in game reproduction is probably with gravity well if it can kick the ball downwards fast enough.

k4zmu2a avatar Jan 21 '22 07:01 k4zmu2a

I remember seeing this happen in the original 3DPB, but it is indeed quite rare and therefore hard to reproduce reliably.

MageKing17 avatar Mar 16 '22 06:03 MageKing17

Don't know, I actually can't remember seeing this bug in 3DPB. But now playing SpaceCadet again after more than a decade. In 2 two weeks, I had this bug more than 5 times! I would say something is wrong with this.

Mugen2015 avatar Mar 16 '22 16:03 Mugen2015

This collision bug has been happening to me, and other people reported the same issue about the original version shipped with Windows. It's likely not a decompilation bug. It always bit me with a fast moving ball.

It's a rare event, but all things being equal, the longer the game, the higher the odds it happens, and the more frustrating it is :)

waptaff avatar Apr 07 '22 02:04 waptaff

The only way to fix things like that is to check physics more frequently. Can be done based on how fast the ball is moving (eg. if the ball is moving more than 10 pixels/frame, then check twice as often, if 30 pixels/frame, three times, etc. Arbitrary numbers are arbitrary, generally speaking you want to check every {ball diameter} distance).

Draco18s avatar Jun 13 '22 23:06 Draco18s

This is most likely fixed by #150. Flipper could teleport behind the ball when flipper received move command while already moving.

k4zmu2a avatar Aug 09 '22 07:08 k4zmu2a

Yes, I believe it does. I'll test it though.

dobragab avatar Aug 09 '22 14:08 dobragab

I changed the flipper collision code yet again. They are now running FT code, a major evolution over 3DPB. Barring errors introduced by me, the new code should work flawlessly.

k4zmu2a avatar Oct 16 '23 07:10 k4zmu2a