Page 1 of 1

Looking for opinions on display data

Posted: Mon Oct 29, 2018 9:04 am
by battagline
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:

Code: Select all

score_status:
.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

Re: Looking for opinions on display data

Posted: Mon Oct 29, 2018 9:40 am
by pubby
There's been a bunch of threads on it. Last one was: viewtopic.php?f=10&t=17950

Don't forget to use the search feature :)

Re: Looking for opinions on display data

Posted: Mon Oct 29, 2018 9:57 am
by battagline
pubby wrote:There's been a bunch of threads on it. Last one was: viewtopic.php?f=10&t=17950

Don't forget to use the search feature :)

Yeah... I definitely should have spent a minute looking for a previous post. Sorry about that