RevEng Posted May 17, 2010 Share Posted May 17, 2010 (edited) 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... 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 May 17, 2010 by RevEng Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted May 17, 2010 Share Posted May 17, 2010 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... That's pretty neat! Michael Quote Link to comment Share on other sites More sharing options...
RevEng Posted May 17, 2010 Author Share Posted May 17, 2010 Thanks, Michael! Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted May 18, 2010 Share Posted May 18, 2010 I bet that would be great for adventure game items found. You'd get a free fade effect on your objects. Quote Link to comment Share on other sites More sharing options...
MausGames Posted May 18, 2010 Share Posted May 18, 2010 (edited) Are there less cycles available in the standard kernel, with this implemented? edit: also, would it be possible to give anything up to make this work with the pfscore option? Edited May 18, 2010 by MausGames Quote Link to comment Share on other sites More sharing options...
RevEng Posted May 18, 2010 Author Share Posted May 18, 2010 (edited) 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 May 18, 2010 by RevEng Quote Link to comment Share on other sites More sharing options...
yuppicide Posted May 18, 2010 Share Posted May 18, 2010 Looks pretty. Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.