Jump to content



0

Multi-color sprite problem


1 reply to this topic

#1 boski OFFLINE  

boski

    Space Invader

  • 13 posts
  • Location:Janesville, WI

Posted Thu Aug 11, 2011 7:01 PM

I just started batari basic a few weeks ago, and I can't figure this one out. I'm trying to create a multicolor sprite, but it always comes out all black. I've tried rearranging the commands, but the result is always the same. Here's my most recent code:

player0:
%00011100
%00011000
%00111100
%00111110
%00111100
%00111000
%00011000
%00011000
end

player0x=45
player0y=60

Main


COLUBK=$EE

player0color:
$40
$D0
$D0
$5E
$5E
$5E
$2E
$2E
end

drawscreen
goto Main


Also, I can't figure out the "set kernel multisprite" command. I never get an error message, but only two large sprites and an enlarged portion of the playfield show up in the emulator.

Thank you anyone for any help!

#2 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Aug 11, 2011 7:22 PM

View Postboski, on Thu Aug 11, 2011 7:01 PM, said:

I just started batari basic a few weeks ago, and I can't figure this one out. I'm trying to create a multicolor sprite, but it always comes out all black. I've tried rearranging the commands, but the result is always the same. Here's my most recent code:

   player0:
   %00011100
   %00011000
   %00111100
   %00111110
   %00111100
   %00111000
   %00011000
   %00011000
end

   player0x=45
   player0y=60

Main_Loop


   COLUBK=$EE

   player0color:
   $40
   $D0
   $D0
   $5E
   $5E
   $5E
   $2E
   $2E
end

   drawscreen

   goto Main_Loop
Here's one way you can do it:


   set kernel_options player1colors

   player1:
   %00011100
   %00011000
   %00111100
   %00111110
   %00111100
   %00111000
   %00011000
   %00011000
end

   player1x=45
   player1y=60





Main_Loop


   COLUBK=$EE

   player1color:
   $40
   $D0
   $D0
   $5E
   $5E
   $5E
   $2E
   $2E
end

   drawscreen

   goto Main_Loop
Click on the link below for more information:

http://www.randomter...l#kerneloptions




View Postboski, on Thu Aug 11, 2011 7:01 PM, said:

Also, I can't figure out the "set kernel multisprite" command. I never get an error message, but only two large sprites and an enlarged portion of the playfield show up in the emulator.
First thing I'd do is search the bB forum for Multisprite programs that people have posted and look at their code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users