# Multi Sprite Kernel wall detection?

3 replies to this topic

• 25 posts
• Location:sometimes Arizona, sometimes Montana

Posted Mon Dec 3, 2018 12:36 PM

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
temp3 = (player0x - 14)/4 : temp4 = (player0y - 1)/8
player0x = player0x + 1

left
if !joy0left then down
temp3 = (player0x - 18)/4 : temp4 = (player0y - 6)/8
temp3 = (player0x - 18)/4 : temp4 = (player0y - 1)/8
player0x = player0x - 1

down
if !joy0down then up
temp3 = (player0x - 17)/4 : temp4 = (player0y + 1)/8
temp3 = (player0x - 15)/4 : temp4 = (player0y + 1)/8
player0y = player0y + 1

up
if !joy0up then movedone
temp3 = (player0x - 17)/4 : temp4 = (player0y - 7)/8
temp3 = (player0x - 15)/4 : temp4 = (player0y - 7)/8
player0y = player0y - 1

movedone

any ideas?

### #2 Lewis2907ONLINE

Lewis2907

Moonsweeper

• 297 posts
• Location:Senatobia, MS

Posted Mon Dec 3, 2018 9:45 PM

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/...4593-lewis2907/

Edited by Lewis2907, Mon Dec 3, 2018 9:46 PM.

• Topic Starter
• 25 posts
• Location:sometimes Arizona, sometimes Montana

Posted Tue Dec 4, 2018 12:23 PM

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.

### #4 GemintronicOFFLINE

Gemintronic

Jason S. - Lead Developer & CEO

• 9,245 posts

Posted Tue Dec 4, 2018 5:10 PM

Here is info on the official stuff:

http://atariage.com/...isprite-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/...d/#entry4165992

#### 0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users