Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Displaying a changing number using images

Author
Message
Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 5th Aug 2008 03:19 Edited at: 5th Aug 2008 03:27
I want to display my score using images of numbers, not text. By using my own images, I can make the numbers that make up the score look pretty and more complex. So a score of 8547 would be displayed by 8.png, 5.png, 4.png, 7.png.

I figure a system like this could work:


Basically, a working idea, except I have no clue how to extract the digits. Anyone know how to extract the individual digits from a number?
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 5th Aug 2008 12:57
Check this out:

http://forum.thegamecreators.com/?m=forum_view&t=122273&b=6

I hope it helps.


Whatever...
Ed222
17
Years of Service
User Offline
Joined: 3rd Nov 2007
Location: Calgary
Posted: 5th Aug 2008 17:49 Edited at: 5th Aug 2008 17:53
or you could just use this sprite 1,x,y,d and change the d aka the image numer
[edit]opps I misread you question

Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 5th Aug 2008 21:45
Ah, clever. It took me a while, and I had to figure out what mod was, but I extracted the bits I want. Thanks!
Dabbler
17
Years of Service
User Offline
Joined: 3rd Mar 2007
Location: Minnesota
Posted: 6th Aug 2008 05:11
I am just glad that I could help.

Now, Deego check this:

http://www.thegamecreators.com/data/newsletter/newsletter_issue_59.html

The tutorial on bitmap fonts may be of even more help.


Whatever...
Deego
16
Years of Service
User Offline
Joined: 21st May 2008
Location:
Posted: 7th Aug 2008 00:48
Here's the finished system:


Everything works perfectly. Thanks!

Login to post a reply

Server time is: 2024-11-25 19:44:55
Your offset time is: 2024-11-25 19:44:55