+atari2600land Posted May 21, 2015 Share Posted May 21, 2015 If it is possible, please tell me how. I've been trying to do this crap for days now and can't figure out anything. All I want is for the stick figure to stop once it reaches the coral, but nooooo, I am too stupid to figure it out. platform7.bas Quote Link to comment https://forums.atariage.com/topic/238559-collision-detection-in-intv-basic-using-scroll-is-impossible/ Share on other sites More sharing options...
freewheel Posted May 21, 2015 Share Posted May 21, 2015 Oh, it's possible. I do it in Desert Bus. Quote Link to comment https://forums.atariage.com/topic/238559-collision-detection-in-intv-basic-using-scroll-is-impossible/#findComment-3241738 Share on other sites More sharing options...
Kiwi Posted May 21, 2015 Share Posted May 21, 2015 (edited) Using #TileID=PEEK $0200+(stickmanX/8)+((stickmanY/8)*20) should get you the value of the card your character is on. If I remembered that the screen data starts at address $0200. Then after that do an if statement like 'if TileID=#0301 then stickmanX=stickmanX-1. This is my method of doing software sprite vs Tile collusion in my Colecovision game. I'm not sure how much cycles it uses up due to division and multiplication. I haven't yet done hardware tile vs sprite collusion for the intellivision. The manual states, bit 8 means collision against background pixel (pixel set). EDIT: I tried the ROM. Both objects have irregular shapes. I would make stick man 2 sprites. The top sprite would be his body, it'll hardware detect if it is feeling the left or the right side of the wall. Being there's a flip variable, then it can use that value to push the character back. Then the feet would hardware detect the floor preventing the sprite from passing through the bottom of the screen. There's 3-4 points of collusion that a character need to detect the floor, walls, and ceiling in a platforming game. Edited May 21, 2015 by Kiwi Quote Link to comment https://forums.atariage.com/topic/238559-collision-detection-in-intv-basic-using-scroll-is-impossible/#findComment-3241743 Share on other sites More sharing options...
Kiwi Posted May 21, 2015 Share Posted May 21, 2015 I thought of something before I drift off to dreamland. You can do it with one sprite. When move left or right, do collusion detection right after your character either left or right. If it collide, then it push you back. Gravity would be another check, when it is time for your character to be pulled down, it can check if the sprite is in the ground, if it is, then it'll push you up. Then another check when you're jumping, if you're jumping and hitting the ceiling, then it'll push you down. Pretty much like, if (cont1.left) then StickmanX=StickmanX-1 then if COL0 and (bit8 enabled) then StickmanX+1if (cont1.right) then StickmanX=StickmanX+1 then if COL0 and (bit8 enabled) then StickmanX-1if jump<>0 then StickmanY=StickmanY+1 then if COL0 and (bit8 enabled) then StickmanY-1if jump=0 then StickmanY=StickmanY-1 then if COL0 and (bit8 enabled) then StickmanY+1My intybasic may be rusty. Above should be able to work. Quote Link to comment https://forums.atariage.com/topic/238559-collision-detection-in-intv-basic-using-scroll-is-impossible/#findComment-3241779 Share on other sites More sharing options...
+nanochess Posted May 21, 2015 Share Posted May 21, 2015 Do you mean it gets stuck in the coral? 1. Once you update a sprite using SPRITE #,x,y,z it's saved in a buffer for next frame (until next WAIT happens) 2. The colision bits are controlled by STIC in that frame. 3. When the frame ends the colision bits are updated (another WAIT) So the colision bits are delayed by two frames. The way to correct it would be to check for colision and once it happens get back by one or two pixels, because your character could be still advancing over. I would suggest to check with PEEK for the coral if you need immediate detection. 1 Quote Link to comment https://forums.atariage.com/topic/238559-collision-detection-in-intv-basic-using-scroll-is-impossible/#findComment-3241895 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.