So in most higher level game development displaying your score and other status to the screen is a pretty trivial thing.
I'm thinking about keeping score in two bytes of data, and I'm trying to think of the best way to transfer that data to the screen.
I want to display it as background tiles because I'd like it to not take up any of my 8 scanline sprite slots. I found it was fairly easy to place letters and numbers into their corresponding ascii locations inside the background section of the .chr file so that I could do something like this when setting up the data I want to display to the screen:
I'm not exactly sure what the best way to fill in the numbers is though. I'm not sure if there's a relatively simple way to convert from binary to base 10 on the 6502, so I'm looking for suggestions.
How do you guys typically display a score in your games? Is there a kind of standard way to do this or does everyone do it as they see fit?
Thanks for your help
I'm thinking about keeping score in two bytes of data, and I'm trying to think of the best way to transfer that data to the screen.
I want to display it as background tiles because I'd like it to not take up any of my 8 scanline sprite slots. I found it was fairly easy to place letters and numbers into their corresponding ascii locations inside the background section of the .chr file so that I could do something like this when setting up the data I want to display to the screen:
Code:
score_status:
.byte "SCORE 000000"
.byte "SCORE 000000"
I'm not exactly sure what the best way to fill in the numbers is though. I'm not sure if there's a relatively simple way to convert from binary to base 10 on the 6502, so I'm looking for suggestions.
How do you guys typically display a score in your games? Is there a kind of standard way to do this or does everyone do it as they see fit?
Thanks for your help