Image Mode - Key
by Ben Sparks - Warspawn · in Torque Game Builder · 03/05/2005 (10:07 am) · 1 replies
Hi all... just got T2D recently, and I'm working on a top down scroller to learn the basics...
Anyway, the question is this and maybe I missed it somewhere in the docs... I have a sprite image 256x256 with magenta all around it (specifically in upper left). I set the datablock to mode=key. If I use a PNG, then it stretches the image funny. If I use a BMP it doesn't even load the program. I haven't tried JPG yet.
Obviously I can just use a PNG and put the transparency in there myself, but I guess I'm wondering if that is the preferred method? I am used to using BMP files (when working with my own coding in c++ and DX and windows doesn't natively support the use of PNG) with color keys. Since the feature is there for color keys, I'm sure there must be some circumstance where that is preferred over PNG alpha?
Thanks,
Ben "Warspawn" Sparks
Anyway, the question is this and maybe I missed it somewhere in the docs... I have a sprite image 256x256 with magenta all around it (specifically in upper left). I set the datablock to mode=key. If I use a PNG, then it stretches the image funny. If I use a BMP it doesn't even load the program. I haven't tried JPG yet.
Obviously I can just use a PNG and put the transparency in there myself, but I guess I'm wondering if that is the preferred method? I am used to using BMP files (when working with my own coding in c++ and DX and windows doesn't natively support the use of PNG) with color keys. Since the feature is there for color keys, I'm sure there must be some circumstance where that is preferred over PNG alpha?
Thanks,
Ben "Warspawn" Sparks
About the author
I'm a web developer by day, hobbyist game developer by night.
Torque Owner Jason McIntosh