On screen display - lap times, speed etc..

Blitz3D Forums/Blitz3D Beginners Area/On screen display - lap times, speed etc..

Stevie G(Posted 2003) [#1]
I need some advice / help with a racing game I'm in the final stages of writing. I'm very new to Blitz3d as you'll no doubt tell by Q. but what I need is some help on the best and quickest method of diplaying on screen info such as .. your current position / laps completed / current lap time / speed etc...

For initial testing purposes I've simply used the 'text' command but this is extremely slow and looks crap. I have looked through the archives and to be honest I can't find anything which will do exactly what I'm looking for.

For the lap timer for example :-

I need to display this as TIME 00:00.00 or sucklike. How do I do this? I'm assuming I have to create images for "TIME" , ":" , "." and "0".."9" and display, in this case, 9 different images/sprites each frame so show this on screen? Also, if I want the numbers after the decimal point to be smaller in size how do I do this?

Any help and/or sample code would be much appreciated.


darklordz(Posted 2003) [#2]
So you mean Bitmapped Fonts?
Look in the USerProjects Forum theres a thread "Testers Needed" it's lil project of mine and it uses bitmapped fonts. If thats what you mean i'll be happy to pass you the function....

l8tr


Stevie G(Posted 2003) [#3]
I looked at the most recent link you posted in projects but there's no reference to bitmapped fonts there so I'm not sure?? Are they the fastest way to display this sort of stuff though?


_PJ_(Posted 2003) [#4]
You cold try writing the text to a sprite and having this parented to the camera, but it may be slower.
----------------


or try this...
http://www.blitzbasic.com/codearcs/codearcs.php?code=698


jondecker76(Posted 2003) [#5]
Actually the text commands aren't all that bad. The thing that got me at first was that I was using my text display routines before Renderworld(), so just in case that is why you're having problems with text, try using your text commands after renderworld.
Also, if done this way, if you want to upgrade to bitmap fonts later, just write a new text routine and you won't even have to change calls to text all over the rest of the source code.


GfK(Posted 2003) [#6]
Buy FONText (search the User Projects forum).

It contains an editor to let you create bitmap fonts with compression, and a set of functions for displaying them easily in 3D.


Grisu(Posted 2003) [#7]
If you don't want to buy Fontext, you might want to try these freeware sources instead... :)

Cyberseth's FontlibV2 (includes Source and a fontmaker).
www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=cyberseth05162003013142&comments=no

3D Text Libary:
www.blitzcoder.com/cgi-bin/showcase/showcase_showentry.pl?id=gillissie01022003212523&comments=no


Stevie G(Posted 2003) [#8]
Thanks Grisu this looks like it's do the job. The Fontlibv2 editor won't work as the function below is not found. I'm assuming that this was written in Blitzplus and it's a GUI function.

Sorry to be a pain but are fonts usually in the format .ggfnt - not very clued up when it comes to this stuff?? Is there an editor for this type of font somewhere or better still has anyone found a place I can borrow (steal) some new colorful fonts from?


FlameDuck(Posted 2003) [#9]
Buy FONText. It's great.


GfK(Posted 2003) [#10]
Is there an editor for this type of font somewhere or better still has anyone found a place I can borrow (steal) some new colorful fonts from?
FONText comes complete with an editor that lets you create your own colourful single-surface fonts from existing TTFs including gradients and special effects, plus it lets you compress the characters to reduce video RAM usage.

It costs less than £10. One of the best bits of software I've ever bought.