waderain Posted December 3, 2018 Share Posted December 3, 2018 I've seen this question in past posts but there doesn't seem to be a resolution to the problem. The code I generally use doesn't work and I'm assuming because the playfield is flipped. This works pretty well for standard games but what would the Y calculation be for the multi sprite kernel? if !joy0right then left temp3 = (player0x - 14)/4 : temp4 = (player0y - 6)/8 if pfread(temp3, temp4) then down temp3 = (player0x - 14)/4 : temp4 = (player0y - 1)/8 if pfread(temp3, temp4) then down player0x = player0x + 1 left if !joy0left then down temp3 = (player0x - 18)/4 : temp4 = (player0y - 6)/8 if pfread(temp3, temp4) then down temp3 = (player0x - 18)/4 : temp4 = (player0y - 1)/8 if pfread(temp3, temp4) then down player0x = player0x - 1 down if !joy0down then up temp3 = (player0x - 17)/4 : temp4 = (player0y + 1)/8 if pfread(temp3, temp4) then movedone temp3 = (player0x - 15)/4 : temp4 = (player0y + 1)/8 if pfread(temp3, temp4) then movedone player0y = player0y + 1 up if !joy0up then movedone temp3 = (player0x - 17)/4 : temp4 = (player0y - 7)/8 if pfread(temp3, temp4) then movedone temp3 = (player0x - 15)/4 : temp4 = (player0y - 7)/8 if pfread(temp3, temp4) then movedone player0y = player0y - 1 movedone any ideas? Quote Link to comment https://forums.atariage.com/topic/285639-multi-sprite-kernel-wall-detection/ Share on other sites More sharing options...
+Lewis2907 Posted December 4, 2018 Share Posted December 4, 2018 (edited) Not sure if the link below will help. RT and others have done some work, but from what I can gather it's because there is no pfpixel to use a reference point. Maybe someone else can help with more documentation as I'm still trying to figure something out as well. http://atariage.com/forums/user/44593-lewis2907/ Edited December 4, 2018 by Lewis2907 1 Quote Link to comment https://forums.atariage.com/topic/285639-multi-sprite-kernel-wall-detection/#findComment-4169915 Share on other sites More sharing options...
waderain Posted December 4, 2018 Author Share Posted December 4, 2018 I thought just reversing the Y calculation would work but it doesn't. Even though the playfield is flipped it seems the pfread doesn't flip. So if you have your Player0y at 80, to the Y pfread it thinks it at 2...I think., at least that's what it seems like it's doing. I'll keep playing with it but it's starting to make me pull my hair out. Quote Link to comment https://forums.atariage.com/topic/285639-multi-sprite-kernel-wall-detection/#findComment-4170248 Share on other sites More sharing options...
+Gemintronic Posted December 4, 2018 Share Posted December 4, 2018 pfread requires an assembly add on in the multisprite kernel. Here is info on the official stuff: http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#pfread Bogax also made his own pfread funcitons for multi sprite: http://atariage.com/forums/topic/213386-pfread-for-the-multisprite-kernel/ Neither option has worked for me. My hunch is that smarted brains could get an example working with bogaxs code. I've figured out how to use the ball as the collision object for the player0 sprite. I've provided a proof of concept that collides with walls without visible rebound and also slides against walls. http://atariage.com/forums/topic/281617-smooth-collisions-using-ball-instead-of-pfread/?do=findComment&comment=4165992 Quote Link to comment https://forums.atariage.com/topic/285639-multi-sprite-kernel-wall-detection/#findComment-4170437 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.