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 / bitmap font sample help needed

Author
Message
battleman100
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 1st Jul 2003 05:03
Sorry to bring this up again, but can anyone post or direct me to a fully-working bitmap font sample written in DBPro. I have seen several examples before between this forum and the U.S. one, but none of them have worked (in fact, a few have successfully hung my PC ) I only really need it for numbers for my score variable, but I would be happy with anything, as long as it contains code, sample function calls (if needed) and a sample font (just for correct formatting - nothing special, a few letters would do!)

I have been racking my brains over this for the last two days trying to get it to work, but all in vain - please help - pleeeeeeeeeeease!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 1st Jul 2003 07:56
this small example does this
creates a box the size of the letter +3
places the letter with the text command over the top
grabs it to an image location and does this from 1 to 10

you might might to change it to 0 - 9 thinking about it further.

once its stored them it converts the images to sprites and displays them.

you may wish to make 3d panels perhaps or one 3d panel storing a few images in a row.



indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 1st Jul 2003 09:53
theres a couple of ways you can go next so Ill show you why I look at both ways

the first thing you may be thinking is yeah i can just take 1 away from the i when i print it.

what happens tho is this

sprite 1 = 0
sprite 2 = 1
sprite 3 = 2
sprite 4 = 3
sprite 5 = 4
sprite 6 = 5
sprite 7 = 6
sprite 8 = 7
etc...

and that can be less confusing if you write a condition like in this example

therefore we will assign sprite 10 to represent 0 and the rest will be easier to manage

this example manages the sprites like this

sprite 1 = 1
sprite 2 = 2
sprite 3 = 3
sprite 4 = 4
sprite 5 = 5
sprite 6 = 6
sprite 7 = 7
sprite 8 = 8
sprite 9 = 9
sprite 10 = 0


etc...







it depends on what way you want to go but always try to keep it simple and organised to save your sanity

battleman100
21
Years of Service
User Offline
Joined: 19th Feb 2003
Location:
Posted: 3rd Jul 2003 03:41
Thank you for that - v. useful
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 10th Jul 2003 13:03
no worries, how did it go after this week passed?

Puffy
22
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United States
Posted: 10th Jul 2003 16:46
o_O Indi are you forgetting Mr TaToads Code... battleman100 I have complete code on it and tons of bitmapped fonts if you need them...

EVERYONE LOVES THE PUFF!... =\

Login to post a reply

Server time is: 2024-11-24 23:09:08
Your offset time is: 2024-11-24 23:09:08