Jump to content
IGNORED

score fade effect


RevEng

Recommended Posts

Here's a nice little bB kernel mod that adds a subtle fade effect to the score. This screen capture illustrates the effect turned on and off...

post-23476-127410691299_thumb.png

 

 

The score fade effect can only be used if you're not already using the "pfscore" option. Choosing the fading is just a matter of setting the scorefade constant in your bB code, or leaving it unset...

const scorefade=1

COLUBK=$00
scorecolor=$8f

gameloop
drawscreen
goto gameloop

scorefade.simple.bas

scorefade.simple.bas.bin

 

 

With scorefade on, you can also get a neat "scrolling colorbars" effect on the score by incrementing the scorecolor...

const scorefade=1
dim frame=a

COLUBK=$00
scorecolor=$0f

gameloop
rem the following code increments scorecolor every 4th frame...
  frame=frame+1
  temp1=frame&3
  if temp1 = 0 then scorecolor=scorecolor+1
drawscreen
goto gameloop

scorefade.colorscroll.bas

scorefade.colorscroll.bas.bin

 

The unified format patch for the standard bB kernel follows. I believe that it should be pretty straightforward to apply it to the score code in the multisprite kernel as well.

std_kernel.scorefade.diff.gz

 

[edit - fixed the forum eating my %00 in the source]

Edited by RevEng
Link to comment
Share on other sites

I think at most you'll only see 3 additional cycles used. In the same vein, it only takes up a few additional ROM bytes, and no additional ram.

 

There are just a few asm commands involved in this this, and the majority of them took the place of NOPs in the timing-critical parts of the score code.

 

[edit - its not going to work with pfscore. The score kernel is really tight cyclewise - it's doing a heck of a lot - and there was barely enough time to squeeze the commands in when pfscore wasn't used. There's nothing else to take away from the score kernel that I can give to the score fade code.]

 

[edit 2 - actually you won't even see those 3 cycles lost. I forgot that they were during screen time, so they don't take anything away from the cycles available to your bB code]

Edited by RevEng
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...