Jump to content
IGNORED

[Errors] Color issues


Glitchy Furrystuff

Recommended Posts

I've been working on batariBasic for about 36 hours now, and that shows exactly how newbish I should be.

 

Now, I've read over my code and I'm getting color problems on the sprite that displays and the title's very top. No matter what I look for and correct in the code, it seems to give me this error. Obviously it compiles and loads, but there's always something wrong with a line of colors.

 

Here's the source code right now (It's a WIP, so it's obviously not a real game yet)

 rem .....................................................
rem Splendid The Squirrel 2600
rem Program and Audiovisuals by Glitch Softwares Studios
rem Happy Tree Friends owned by Mondo Mini Shows
rem THIS IS NOT AN OFFICIAL GAME
rem .....................................................


rem Title startup
POWER_ON
set kernel_options player1colors pfcolors

rem Splendid's very own title screen!
pfcolors:
$8E
$8C
$8A
$88
$86
$84
$82
end
playfield:
.XX..XXX..X..XXX.XX..X.XX..X.XX.
X..X.X..X.X..X...X.X.X.X.X.X.X.X
X....XXX..X..X...X.X.X.X.X.X.X.X
.XX..X....X..XXX.X.X.X.X.X.X.X.X
...X.X....X..X...X.X.X.X.X.X.X.X
X..X.X....X..X...X.X.X.X.X.X.X.X
.XX..X....XX.XXX.X..XX.XX..X.XX.
end


rem Enable game to start by pressing the FIRE button with Joy1
rem [uNCONFIRMED] Joy2 can FIRE and start a Splendid VS Spendont match
TITLE_LOOP
drawscreen
if joy0fire then GAME_START
goto TITLE_LOOP

GAME_START
scorecolor = $80
player0x=50 : player0y=50

rem Splendid's sprite state. Explained later in code
s = 0

pfcolors:
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
$00
end
playfield:
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
.................................
end

SPLENDID_SPRITE

rem "s" stands for State, as in Sprite State, which will give player0 (Splendid) a specific sprite to represent the position he'd be in
rem     s0 should be idle pose
rem     s1 should be flying up pose
rem     s2 should be decending pose
rem     s3 should be punch (in 2P Mode)

if s=0 then player0color:
$D2
$D2
$86
$86
$86
$86
$86
$86
$86
$86
$86
$86
$86
$40
$86
$86
end
player0:
000000
000000
000110
000100
000100
001110
111111
%01110111
%11110111
%11110111
%11110110
%01100110
%01001111
001111
001111
000110
end

GAME_LOOP





DRAW_FOREVER
drawscreen
goto DRAW_FOREVER

 

I hope I didn't just break a rule posting all that. Thanks in advance for your help.

 

Oh, and I don't claim the player as my own, all ownerships go to Mondo Mini Shows.

Link to comment
Share on other sites

I think I see both problems.

 

For the title screen, try this:

 

rem Splendid's very own title screen!
  playfield:
  .XX..XXX..X..XXX.XX..X.XX..X.XX.
  X..X.X..X.X..X...X.X.X.X.X.X.X.X
  X....XXX..X..X...X.X.X.X.X.X.X.X
  .XX..X....X..XXX.X.X.X.X.X.X.X.X
  ...X.X....X..X...X.X.X.X.X.X.X.X
  X..X.X....X..X...X.X.X.X.X.X.X.X
  .XX..X....XX.XXX.X..XX.XX..X.XX.
  ................................
  ................................
  ................................
  ................................
end

 rem Enable game to start by pressing the FIRE button with Joy1
 rem [uNCONFIRMED] Joy2 can FIRE and start a Splendid VS Spendont match
TITLE_LOOP

  pfcolors:
  $8E
  $8C
  $8A
  $88
  $86
  $84
  $82
  $00
  $00
  $00
  $00
end

 drawscreen
 if joy0fire then GAME_START
 goto TITLE_LOOP

 

 

And for your sprite, you are using player0 instead of player1. Switch the numbers from 0 to 1 and that will be fixed too.

Edited by Random Terrain
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...