The best way for game text?

Blitz3D Forums/Blitz3D Programming/The best way for game text?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hey, you can use a simple Quadbased Mesh for the Text. Build a single Surface Text System, that's pretty simple. Use a Bitmap that contains all required Characters. Build a Mesh that contains the Max. Number of Characters you want to use for Text Output as Quads, one Quad has 2 Triangles, Example:

_________________
¦/¦/¦/¦/¦/¦/¦/¦/¦

Now when you want to write some Text simply use VertexTexCoords() to assign the Quads to the right Characters on the Texture.

So when you write a Text with 500 Chars then it might use 1000 Polygons. Of course this Mesh sould be positioned in front of the Camera. You can use any Alpha- or Mask Mode, or even better: Blending Modes using Multiply aso.

Note: such 3D based Text is always a bit blurred, especially in low screen-resolutions. It's nice for a Hand full of chars, but not so usefull for tons of text.

Goodies: Fade in/out using alpha, Zoom in /out, rotate, explode it, whatever you want.