forums

TNT Basic Forums > Programming Q&A
Hello Everyone, a Noob's got a question
< Last Thread     Next Thread >
Author
Thread        Post A Reply

08-12-2005 18:44

Posted by:
Arcygenical

Location:
Oakville, Ontario, Canada

Click Here to Email Arcygenical   Find more posts by Arcygenical

First off, as this is my first post, I'd like to say hi to everyone here on the forums. I've been working on a school-issued IBM laptop for the last 2 years, and during that time I was able to create various RPG-like systems using an engine called Sphere. My choice of OS is and always be OS X, thus I figured I'd port my games and examples to TNT. I've only hit a couple of blocks on the way so far (Incase you're wondering, I'm actually progressing well) but am having some difficulties, maybe someone can help me out?

First off, About image loading. Is loading an image from an Image Bank to a sprite the only way to view images? Is there a more direct image only command (For example, the interface of a battle system, I never need to move or change it, so could I just draw the image to the back canvas every frame then show it?). Also, are there any functions which can manipulate the size or shape of an image before it's drawn (like real time stretching/compression/warping etc.)

Does the engine support animated map tiles?

and finally... How do you get a string drawn to the visible screen, using a font?

Thanks to anyone who reads this, and even more thanks to someone who helps me out ;).

08-12-2005 21:45

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Hi, have you tried 'Paste Image, x, y, imageID[, bank]'? Sounds like what you're looking for, takes an image straight from a bank (current or specify-able) and displays it at the specified co-ordinates.

There are currently no runtime manipulation calls. It does currently support animated GIF and several movie formats though, so if it's a spot effect you're after this could be a possible short term solution. In the long run, the project is going Open Source and image manipulation used to my thing (kind of professionally!) so when I get my hands on some source it is definitely something I could contribute to. Otherwise I'm afraid it's something that will need to wait.

As for animated tiles, there is no support for animating tiles in the map utility (i.e. automatically), though you could use calls to 'Map Tile' and 'Set Map Tile' to change the image reference programatically. Have you tried animated GIFs? You could also try setting up the animated areas as objects (if there are only a few) and use sprites to represent them. These animations could be programmed automatically using MOAN. With the variable size options of sprites, and transparency and such you could create some great effects like seamless water for example, then use collision detection to stop people going in it... lots of possibilities!

Text using different fonts, the routines you need are in the 'drawing' section of the user guide (a .pdf version, fully linked and indexed is available here). They include 'Text Font', 'Text Face' as well as other goodies. Set the characteristics first, set the draw context with a call to 'Canvas' then just 'Print'...

Hope this helps, and any more problems just let us know, and good luck with project(s)!

Danny (Nods)

08-13-2005 01:19

Posted by:
Arcygenical

Location:
Oakville, Ontario, Canada

Click Here to Email Arcygenical   Find more posts by Arcygenical

Great!

Thanks alot, everything worked really well. Just wondering though, is there any way to change the size and the colour of the Draw Text function? Text Font and Text Face both control what you see, but I don't see any options for colours or sizes..?

08-13-2005 07:59

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Easy Peasy lemon Squeezy!

The Text size can be changed with... er... Text Size, and the colour (you didn't say "color", how cool!) is Set Pen Colour. You can make the required colour value with Make Colour (R, G, B).

Danny (nods)

08-13-2005 10:00

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Oh and all commands that contain the word 'colour' also work if you spell it 'color' :)

08-13-2005 11:02

Posted by:
allnodcoms

Location:
hertfordshire (England)

Click Here to Email allnodcoms   Find more posts by allnodcoms

Nice touch ;)

Danny (nods)

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.