forums

TNT Basic Forums > Programming Q&A
About drawing text, oval ect..
< Last Thread     Next Thread >
Author
Thread        Post A Reply

04-16-2004 18:30

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

Hello everybody

Can i draw text during a game ?
Same thing about lines and ovals.

MY game looks somewhat like this:


do
draw sprites...
move sprites...
check collisions...
scroll screen..
draw frame
loop until game over

Now i want to draw some text in the beginning of a level (to announce the
name of the level and the number), how can i do this.
It flickers if i use the draw text command... Of course i can use text sprites,
but then i have to import images first... (that will cost memory, i'm reaching the 16 Mb limit)

Perhaps it's a very simple question... but i don't know it.. (i only use sprites)


JW

04-16-2004 19:27

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

You don't neccisarily have to import anything in; you can create a small canvas in-game and draw whatever you want to write into that. You then use the copy image command and place it into an image bank. This method uses no extra disk space, but requires some nifty programming.

04-16-2004 19:54

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

Thanks, i think that is the question i was hoping for...
First draw the image / text in a canvas and then copy it into the image bank...!

I will try that, it probably works out fine..

Thanks

04-17-2004 13:53

Posted by:
JW

Location:
Netherlands

Click Here to Email JW   Find more posts by JW

It works out allright...

But now another question, i choose to wirte in the "gadget" font.
Will this work on every computer ? What will happen if that font is not installed on the computer... ?

Can i have problems this way ?

text font "gadget"



JW

04-17-2004 21:33

Posted by:
-wyvern

Location:
Bedroom

Find more posts by -wyvern

It's worth including any obscure fonts in the downloaded archive. I don't know whether TNT can embed a font in with the code file, so it's better not to risk your letters dissapearing when they are not done on your computer. Another thing you could do I suppose is to have all the letters you want as picts which you have a procedure to place on a canvas at runtime - it's cheaper space-wise than rendering the whole sentence as a big thing in photoshop. If you've seen the radical rebound game, it uses this sort of thing in the title screen.

04-18-2004 04:17

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

But putting a font file with your game introduces another problem: copyrights. I don't think you can legally distribute a font without permission, and the gadget font I think belongs to Apple.

You could just choose a font that most, if not all, macs have. I think gadget is pretty common, but I'm not sure.

04-18-2004 04:43

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

i think gadget comes standard with macs. you could just throw in a read me that tells the player were to get the font if the don't have it for some reason.

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.