STGraves Posted October 6, 2015 Share Posted October 6, 2015 Can anyone give me a advice on how can I add collision detection to the enemy (player0)? Here I attach my code for you to check it out and give me some examples on how can it be done because the code is a bit long and different from usual. plyr1.bas Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 6, 2015 Share Posted October 6, 2015 Is this the same as what you posted here: atariage.com/forums/topic/239220-collision-prevention-with-adjustable-sprite-height-and-width/?p=3338067 You should probably disable the enemy sprite temporarily and get the collision detection working properly for the player, then once you have that working, use the same technique for the enemy sprite with different variables. Quote Link to comment Share on other sites More sharing options...
STGraves Posted October 6, 2015 Author Share Posted October 6, 2015 (edited) Yes it's the same well the code a little bit modified, can the collision detection work properly with pfscroll on?, because as far as I can recall you said once that it wouldn't work properly with a scrolling playfield, and that was true because I couldn't tweak it enough to stop the stickiness from the walls. Edited October 6, 2015 by STGraves Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 6, 2015 Share Posted October 6, 2015 Yes it's the same well the code a little bit modified, can the collision detection work properly with pfscroll on?, because as far as I can recall you said once that it wouldn't work properly with a scrolling playfield, and that was true because I couldn't tweak it enough to stop the stickiness from the walls. It might eventually work if you spend time figuring out how to make it work. That's what I do. I play around with the code and try a billion things until it either works or I give up. Quote Link to comment Share on other sites More sharing options...
STGraves Posted October 6, 2015 Author Share Posted October 6, 2015 All right!, thanks for the tip and... the inspiration , I'll do it, thanks RT. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted October 6, 2015 Share Posted October 6, 2015 All right!, thanks for the tip and... the inspiration , I'll do it, thanks RT. Related videos: youtube.com/watch?v=2ZO1jauV31U https://www.youtube.com/watch?v=2ZO1jauV31U youtube.com/watch?v=fZMyUXgVDKg https://www.youtube.com/watch?v=fZMyUXgVDKg youtube.com/watch?v=uVN-7h4YiAs https://www.youtube.com/watch?v=uVN-7h4YiAs Quote Link to comment Share on other sites More sharing options...
STGraves Posted October 6, 2015 Author Share Posted October 6, 2015 Hahahaha, come on I was not being sarcastic, I'm not asking for you to do it man xD, yeah I agree I'm a n00b xD Quote Link to comment Share on other sites More sharing options...
Papa Posted October 8, 2015 Share Posted October 8, 2015 if collision(player0,player1) then gosub eatme bank2 2 Quote Link to comment Share on other sites More sharing options...
Mountain King Posted October 8, 2015 Share Posted October 8, 2015 if collision(player0,player1) then gosub eatme bank2 Haha. bank 2 eatme if _size >= 128 then _gag{1}=1 else _gag{1}=0 if _gag{1} then gosub __check_for_choke return otherbank. 1 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.