+atari2600land Posted August 30, 2007 Share Posted August 30, 2007 I've been working all night to get this thing to work, and it won't work properly. If you watch the demo, the ball (which is missile1) won't get rid of the pfblocks right. (never mind the name, it's actually Breakout.) Help! breakthru.bas Quote Link to comment Share on other sites More sharing options...
Robert M Posted August 31, 2007 Share Posted August 31, 2007 I've been working all night to get this thing to work, and it won't work properly. If you watch the demo, the ball (which is missile1) won't get rid of the pfblocks right. (never mind the name, it's actually Breakout.) Help! Your ball is 2 pixels by 2 pixels, so it is made up of 4 pixels any of which can be detected as colliding with the PF graphics. Your mathematical check after the fact only looks at one of the 4 pixels that may have collided. So if the pixel that actually collided is not the pixel you are checking, then you get the behavior you are seeing. A hardware collision does not guarantee a block was hit. You may wish to change which of the 4 pixels you check depending on the direction the ball is traveling. Map that pixel to the screen PD coordinates and then read that PF block to make sure it is still on. If it isn't on, then one of the ignorable pixels of the ball is what caused the hardware collision detection. Cheers! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.