I've come across a few more possible bugs in the multisprite kernel that I'd like to share.
1. Collision Detection doesn't seem to work properly. I pasted in some code below to use as an example. It the sample program, when a collision occurs between the player and any other sprite on the screen, it should send your player sprite to the upper left hand corner of the screen, which should mean there is no longer a collision taking place and you should be able to move. However, it seems that once a collision of any kind is made, the compiled code thinks that it is
always taking place. Once you hit another sprite, your player is immovable at the top left of the screen.
2. It seems that all 6 sprites
must be defined, or none will appear. If you use the sample program below and remove the sprite graphic definition for player5, as well as the 'player5x=o:player5y=p' line, none of the sprites will appear. This may be by design, I'm not sure.
3. I know this was already mentioned, but I noticed a little detail that might be helpful. The background color does change properly until you call a drawscreen, which then forces it to grey.
Steve
init
set kernel multisprite
a=130 : rem X Position of Player0
b=24 : rem Y Position of Player0
c=36 : rem X Position of Player1
d=34 : rem Y Position of Player1
i=130 : rem X Position of Player2
j=44 : rem Y Position of Player2
k=36 : rem X Position of Player3
l=54 : rem Y Position of Player3
m=60 : rem X Position of Player4
n=64 : rem Y Position of Player4
o=80 : rem X Position of Player5
p=74 : rem Y Position of Player5
main
COLUPF=144
COLUBK=208
COLUP0=46
COLUP1=30
COLUP2=55
COLUP3=95
COLUP4=138
COLUP5=238
scorecolor=64
player0:
%00000000
%00111100
%01000010
%10011001
%10100101
%10000001
%10101001
%01000010
%00111100
%00000000
end
player1:
%00000000
%00000000
%11111100
%11111100
%11111100
%10000100
%10000100
%01001000
%00110000
%00000000
end
player2:
%00000000
%10111010
%11111110
%10111010
%00111000
%10111010
%11111110
%10111010
%00111000
%00000000
end
player3:
%00000000
%10000100
%11001100
%11111100
%11111100
%11111100
%11001100
%11001100
%10000100
%00000000
end
player4:
%00000000
%00000000
%00000000
%11111100
%10000100
%11111100
%00000000
%00000000
%00000000
%00000000
end
player5:
%00000000
%00000000
%00110000
%01111000
%11111100
%01111000
%00110000
%00000000
%00000000
%00000000
end
player0x=a : player0y=b
player1x=c : player1y=d
player2x=i : player2y=j
player3x=k : player3y=l
player4x=m : player4y=n
player5x=o : player5y=p
if joy0right then a=a+1
if joy0left then a=a-1
if joy0up then b=b+1
if joy0down then b=b-1
drawscreen
if collision(player0,player1) then a=28 : b=83
goto main