jbs30000 Posted October 20, 2011 Share Posted October 20, 2011 Apologies if I'm typing something you guys already know. I did lots of searching on virtual sprite collision detection and didn't find much so I did my own experiment. I placed sprites 0 and 3 on the screen and then programmed the joystick to move sprite 0. I put, if collision(player0, player3) then reboot and every time they touched the program rebooted. I changed all references from sprite 0 to sprite 5 and it still worked. This is awesome. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 21, 2011 Share Posted October 21, 2011 So you're saying that collision detection is easier with DPC+ than with the old Multisprite Kernel? If so, that is awesome. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted October 22, 2011 Author Share Posted October 22, 2011 I rarely used the old multisprite kernel, but I'm pretty sure that you couldn't use collision(playerx, playerx) for sprites 2 and above. So yeah, it's a lot easier than before. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted November 4, 2011 Author Share Posted November 4, 2011 I just discovered something else. If you check for a collision between player0 and players 2-9 you'll get an accurate reading. If you check for a collision between player0 and player1, then any collision between player0 and players 1-9 will cause a collision and you'll have to narrow it down by doing other collision checks between player0 and players 2-9. Or check for other collisions first and place (player0, player1) last. 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted November 4, 2011 Share Posted November 4, 2011 I just discovered something else. If you check for a collision between player0 and players 2-9 you'll get an accurate reading. If you check for a collision between player0 and player1, then any collision between player0 and players 1-9 will cause a collision and you'll have to narrow it down by doing other collision checks between player0 and players 2-9. Or check for other collisions first and place (player0, player1) last. Thanks for the info. Quote Link to comment Share on other sites More sharing options...
jbs30000 Posted November 5, 2011 Author Share Posted November 5, 2011 My final post about this. Disregard what I've been saying. I've done lots of tests and it doesn't work as simply as I thought. Depending on where the collision occurs, sometimes a collision between player0 and player2 registers as a collision between player0 and player2, other times it registers as a collision between player0 and player1. I guess for now checking the x and y positions of sprites to see if there's any overlap is the way to go. At lease for bB version 1.1d. Quote Link to comment Share on other sites More sharing options...
chickenxhat Posted August 4, 2013 Share Posted August 4, 2013 could RT or jbs give an example of checking x and y positions to differentiate between collisions? it must be simple, as all references I've found to this are without examples, but if one of you guys (or anyone else) could spell it out for me, that'd be fantastic. i'm using multisprite, and before i recode my game to utilize DPC i'd like to see if i can get checking x/y's to work. also, my apologies for necropost. 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.