TNT Basic Forums > Programming Q&A
draw text command problem
< Last Thread     Next Thread >
Thread        Post A Reply

12-12-2001 03:30

Posted by:

Click Here to Email brett   Find more posts by brett

im making a game and for the score i have the number displayed as a string using the draw text command. heres the problem, the number gets all messed up, its like its drawing lots of numbers on top of each other... whats wrong?

12-12-2001 05:56

Posted by:

Find more posts by Jim

Perhaps it *is* drawing lots of numbers on top of each other if the old numbers are not being 'erased.' I know I've done similar things in the past (both recently with TNT basic and previously with other languages) where I've drawn changing things on to the background or something so that the old images/text is displayed along with the updated ones... which can look messy.

I don't know, maybe that's not what's going in your case, but its worth looking into.

12-12-2001 13:34

Posted by:

Click Here to Email brett   Find more posts by brett

thats exactly whats happening. how can i fix it?

12-12-2001 13:51

Posted by:
John Treece-Birch

Find more posts by John Treece-Birch

Drawing Numbers

It depends on what is supposed to be behind your numbers.

If your numbers are just on a black background then you can just draw a black rectangle down over the old numbers and then put new numbers down over the nice, clean black rectangle.

If your numbers are above something else then you will have to make each separete number an individual sprite and just set the sprite's image to be the correct number image.

Hope this makes sense,

12-12-2001 14:24

Posted by:

Find more posts by Socrates


If you've got a non-uniform background behind the numbers there's no need to make them sprites. Simply make sure you redraw the background beneath them, whatever it is every frame. If it's a picture redraw the picture, if it's moving sprites, redraw the background under them (the sprites should handle their own redrawing).

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.