Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
breakout - a little help needed
I'm making the game breakout in pascal as part of a school project. I'm a bit stuck on a couple of things.
in the main game loop i have a procedure called ball_move; I have done this so that the ball will be constantly moving/bouncing. however, because the keypresses are also monitered in the main game loop, whenever you move the paddle the ball waits for the paddle to move then carries on thus creating a slow motion effect on the ball. how do i stop this from happening?
the next problem is to do with collision detection. I have drawn all my blocks in a procedure called bar. however, i don't know how to make the ball bounce off these blocks. I can only do it for 1 block. how do i make it bounce off all the blocks?
my last problem is that i don't know how to delete the block that the ball has hit. i have a bit of an idea but i need some help with it.
my blocks are in an array like this:
var type barinfo = record
bars: array [1..7*5] of barinfo;
if you can help then please e-mail me (mailto:email@example.com) and i'll send you all my code.
0 · ·