Captain Spazer Posted April 27, 2020 Share Posted April 27, 2020 I am incompetent when it comes to math, hoping someone more adept could help me out with this one: Code for collision detection for 8x8 sprite, need it to be for a 16x8 sprite rem player moves right if !joy0right then goto __Skip_Joy0_Right if player1x >= _P_Edge_Right then goto __Skip_Joy0_Right temp5 = (player1y-1)/8 temp6 = (player1x-9)/4 if temp6 < 34 then if pfread(temp6,temp5) then goto __Skip_Joy0_Right temp3 = (player1y-8)/8 if temp6 < 34 then if pfread(temp6,temp3) then goto __Skip_Joy0_Right __Skip_Joy0_Right rem player moves left if !joy0left then goto __Skip_Joy0_Left if player1x <= _P_Edge_Left then goto __Skip_Joy0_Left temp5 = (player1y-1)/8 temp6 = (player1x-18)/4 if temp6 < 34 then if pfread(temp6,temp5) then goto __Skip_Joy0_Left temp3 = (player1y-8)/8 if temp6 < 34 then if pfread(temp6,temp3) then goto __Skip_Joy0_Left 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.