Solving tunneling issues?

So I did a simple pong game ( )

And I wanted to work on it abit more, but I can’t make it more fast-paced and active because of collision issues:

First of all I had to reduce quite abit the ball’s speed because any further and it’d keep trespassing the pads with several collisions (can detect due to sounds), and then I can’t thrust pad into ball by going forward to give it extra impulse because it’ll do the same.

Any suggestions on things I could do to try fix tunneling? I really needed to get this out of the way to get the game I envision… something really fast-paced and reflex-based… I tried using ccd but I’m not sure if I used it well: it seemed to help abit, but not much (it’s present in game atm)

There is something called sweep testing that might help…

if you use antive bullet (in jbullet is a bit buged) use cpp (or was is ccp?) well anyway that defines a distance per tick that is safe, if it goes faster, the physics is doing a sweep test internally first.

I would actually try to do simple ray tests, and do the rest of the bounce calcualtion based on the hitnormal in 2d space myself.

I have a suggestion for your game ^.^ Just this - make the up and down keys do the same as W and S.

or even better, use W and S keys to move the left and Up and Down keys to move the right and you got yourself a mulitplayer game :smiley:

also if you don’t want to react to all the collisions, you can add a time delay between them, i.e if collision happened < 0.2s ago, skip it

Sweep testing, no clue what that means, I’ll search into it.

You mean ccd I think, continuous collision detection, Empire. How do I use native jbullet? No clue… I’ll have a look. With jme’s ccd, I set it to ridiculous values like 0.000000001f and it still won’t cut it though.

And yeah, I did make another build with that to play with my friends :stuck_out_tongue_winking_eye: (or try, since the game’s aim was to be multilplayer but as soon as I took a look at spiderMonkey it seemed way too big for me to tackle with my little knowledge) I’ll get a link on the page to a build with multiplayer keyboard in it then :slight_smile:

And wezrule, I don’t think that’ll fix it, because the issue is that the first collision gets the ball INTO the pad due to speed… but I’ll try it tomorrow, doesn’t hurt to!

Done! Use WASD/arrows to control blue pad, and if you press E you can control blue pad with WASD, and yellow one with arrow keys! Also a random grav upon each collision, switch on or off with R!