flipper game

Hello guys,

first of all i am very grateful for this nice piece of code ported to actionscript 3.
I am new to box2d learning it from 2 weeks and thats why i am probably doing things wrong.
I have 1 major problem and 1 smaller which i need some help please.

The first problem is that some times arrows do not collide to the ball we have left and right arrows like every flipper game.

One partial solutions is setting frame rate to 100 ( pretty insane for the cpu ) and the world dt interval 1/60 (Hz).
Doing fewer frame rate makes things very slow and bigger T is making things less collidable. Actually the ball doesnt collide well only with the end of the hit arrow sometimes doesnt collide at all ...

http://iweb-bg.com/game/index.html (A + D, arrows keys <- Space -> to move the ball)

i think the problem is that i am applying force like :

myLeftArrow.ApplyForce(new b2Vec2(0, -5000), myLeftArrow.GetWorldCenter());

the smaller problem is that when holding the key for the arrows to move eventually it is shaking and the force is damping is there a way to have a static force while holding the A+D keys ?

i appreciate the help.

Philip
I cannot see the bottom of the pinball on my 1280*720 screen.
should have a scroller now.
You don't get collisions because your ball is moving too fast and tunneling.

You need to define the ball as a "bullet". Check the manual:
http://www.box2dflash.org/docs/2.0.2/manual#Bullets
thanks man works like a charm ❗


😀 😀 😀 😀

Original thread: https://box2d.org/forum/viewtopic.php?t=5713