Jump to content
Sign in to follow this  
KevKelley

Blank Middle Score Sprites!

Recommended Posts

Posted (edited)

I had seen in a different post where there is a way to call on the score sprite and use it for something else.

 

I was wondering if there was a way to somehow swap out a score sprite and use something else in a part of code.

 

So let's say you wanted to swap out the Number 6 sprite temporarily with something like a dash. Is there a way to do this?

Edited by KevKelley

Share this post


Link to post
Share on other sites

Thanks! I will have to try this. Hopefully I don't have any issues trying to implement this.

  • Like 1

Share this post


Link to post
Share on other sites

So after some looking, I don't think I can add ny extra sprites or move enough code around, as my last bank is full.  

 

Ideally I would love to either make a block or leave it blank. I didn't know if there was something like player0height for the score sprites.

Share this post


Link to post
Share on other sites

After looking this up further, it seems I asked a similar question about swapping sprites. The answer was that it was possible but would come at a cost. But I do still wonder about the heights thing...

Share this post


Link to post
Share on other sites

Can you describe in more detail what you are trying to do in this case? Maybe one of us will have a useful idea to help.  🙂 

 

As far as the height goes, that's not controlled by a variable, but is hardcoded to be 8 lines, and all of the included score fonts are also 8 lines tall.

 

Do you have room for 8 more bytes in your graphics bank? If you are only adding one symbol or a blank, then that's all it should take, I think.

  • Thanks 1

Share this post


Link to post
Share on other sites

I guess I was just trying to use the first 2 and last 2 numbers of the score for a mini-game. So in the minigame I was trying to make the 2 middle numbers either blank, a solid color, or as I had it now, I set _sc2 to something like 240 so it is a glitchy blob that kind of keeps the 2 scores separate for now. And part of me liked how it looked but I was trying to give a more symmetrical appearance. 

 

I saw the hex score to get another digit, and I suppose I could try that but I think my graphic bank has something like 4 bytes left (if memory serves me correctly). I did wonder how that works. Does that interfere with the score when adding? Or does it just make a couple more sprites available for use? I might be able to free up a few more bytes if I play around a bit.

 

I guess I was looking for different solutions for a minor issue before I proceed.

 

 

 

 

Share this post


Link to post
Share on other sites

If blank works, then you may not have to do anything special at all. I never noticed, but there seems to be a blank area following 9 in the default score_graphics. Try setting _sc2 to $AA instead (each hex digit is 10), and both of the digits should be blank. It worked for me when I tried it, at least:

 

section2_bas.thumb.png.0ccf8f7411b849a8460cd700a8964f0c.png

  • Thanks 1

Share this post


Link to post
Share on other sites

I will definitely try. And as a side note I feel like this could open up some opportunities in the future, as I had seen some requests in the past for 2 2-digit scores. Looks like you found a really simple solution. 

 

Thank you!

Share this post


Link to post
Share on other sites
30 minutes ago, Karl G said:

If blank works, then you may not have to do anything special at all. I never noticed, but there seems to be a blank area following 9 in the default score_graphics. Try setting _sc2 to $AA instead (each hex digit is 10), and both of the digits should be blank. It worked for me when I tried it, at least:

 

section2_bas.thumb.png.0ccf8f7411b849a8460cd700a8964f0c.png

 

If there's no graphic specified for hex value A wouldn't it point to invalid data on a real cartridge?

 

@KevKelly:  did you try adding the extra A-F values as documented in the links and you ran out of space?

 

Not bugging or anything.  Just curious about these things :)

 

Share this post


Link to post
Share on other sites
8 minutes ago, Gemintronic said:

 

If there's no graphic specified for hex value A wouldn't it point to invalid data on a real cartridge?

 

@KevKelly:  did you try adding the extra A-F values as documented in the links and you ran out of space?

 

Not bugging or anything.  Just curious about these things :)

 

I didn't try to add them because I assumed I wouldn't have enough space to execute it.  I only have 6 bytes free in the last bank and thought it would be too much so I was looking at other things that I could do in the other banks first.  I also was unsure if it would interfere with my score keeping so until I had a chance to mess with I was looking into it some more (I haven't had much opportunity for any serious time on my game).

 

I noticed when I did $AA with my own font it came out with solid blocks and line (which was kind of what I was working with earlier.  When I tried a different font it worked!

 

CROSSDOCK_16k_04_13_21_aa.bas_2.png

CROSSDOCK_16k_04_13_21_aa.bas_1.png

  • Like 1

Share this post


Link to post
Share on other sites
37 minutes ago, Gemintronic said:

 

If there's no graphic specified for hex value A wouldn't it point to invalid data on a real cartridge?

Take a look at score_graphics.asm in the bB includes directory. After the 9 digit, there's 8 lines of blank (0) defined. That's what is being read  

  • Thanks 1

Share this post


Link to post
Share on other sites
30 minutes ago, KevKelley said:

 

I noticed when I did $AA with my own font it came out with solid blocks and line (which was kind of what I was working with earlier.  When I tried a different font it worked!

 Maybe your font doesn't have the zeros following the 9 graphic like the others do? It shouldn't take any extra space if you are just matching what's in the other fonts. 

  • Like 1

Share this post


Link to post
Share on other sites

If I were really clever I'd find where bB actually draws the score and tell it to skip the middle two digits.  That would leave the center score variable free for use :)

 

UPDATE:  Not clever enough.  I did realize one could do a "const noscore = 1" and then use the playerscores mini kernel.  Not sure if that would increase the bloat though.

https://atariage.com/forums/topic/113146-minikernel-player-scores/

 

  • Like 1

Share this post


Link to post
Share on other sites
19 minutes ago, Karl G said:

 Maybe your font doesn't have the zeros following the 9 graphic like the others do? It shouldn't take any extra space if you are just matching what's in the other fonts. 

I just checked and I do not have any zeros following the 9 graphic. Thanks!

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...