boski Posted September 16, 2011 Share Posted September 16, 2011 Hey guys, I've just about finished my game "Balloon Protest." The object is to fill the top of the building with balloons, without the badguy popping them along the way. The last thing I need to do is program the playfielf-player0 collision portion. I just can't seem to get this part right. My current version leaves the balloon stuck to the playfield. Hopefully it's a quick look and a quick fix. If someone could take a look, I'd really appreciate it. Thanks a lot! Balloon Protest3.bas Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted September 16, 2011 Share Posted September 16, 2011 You need to move your collision code to after the drawscreen this way it knows when P0x and P0y were in a non-collision zone, and can reset player0x and player0y to those coordinates. If they happen after a collision and before drawscreen, then it resets the P0x and P0y into the wall causing constant collision. It's not smooth as ice collision, but it works for now. I also fixed the hold reset issue and show how a simple debounce works. BalloonProtest3.bas Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 16, 2011 Share Posted September 16, 2011 Check out this example program when you get a chance to see if it has anything you can use: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_ball_miss_coll_example Quote Link to comment Share on other sites More sharing options...
boski Posted September 16, 2011 Author Share Posted September 16, 2011 Thank you so much for all your help. You've really taught me a lot. Can't tell you how much I appreciate it! 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.