Vector Art
by Kiyaku · in Torque Game Builder · 07/10/2007 (3:28 pm) · 2 replies
Hi,
i couldn't find anything about it so im making a new post.
In a topic (years ago) i saw someone talking about Vector Objects.
So i wanted to ask if its possible to draw Vector Art within Torque or import them. I only need simple black and white colored vectors.
For example, i make a game its only in black and white and you walk up a tower. I use a huge Picture for it, but when you zoom in, you see its blured
Testvideo here!
So it would be better if i could use vector art for the shapes so there are no blurred lines.
Is it somehow possible?
i couldn't find anything about it so im making a new post.
In a topic (years ago) i saw someone talking about Vector Objects.
So i wanted to ask if its possible to draw Vector Art within Torque or import them. I only need simple black and white colored vectors.
For example, i make a game its only in black and white and you walk up a tower. I use a huge Picture for it, but when you zoom in, you see its blured
Testvideo here!
So it would be better if i could use vector art for the shapes so there are no blurred lines.
Is it somehow possible?
#2
07/12/2007 (8:00 am)
The minimize blur you should use source art as close to your on-screen size as possible. It could be you're scaling the image to be far larger than the source image so the filtering is having to make some guesses. TGB uses bilinear filtering which means it's great for scales of 50% or 200% (but not something like 800% or 1000%) but you'll get blur or jaggedness if you scale to 57% or 203%. I'm not knocking TGB. It's the nature of pixels that you can't render half a pixel.
Associate David Higgins
DPHCoders.com
First, let me say I've tried Angela's World and I thought it was a great game. Unbelievable idea, and the overall game play just pulled me in ... the music and the craziness of it all is probably what did it, but great job.
As far as drawing vector objects within TGB, there is no 'built in' way to do this, however, I do recall seeing a post at one point that allowed you to draw shapes to the screen ... simple shapes like Squares, Triangles, Lines, etc ... now, they were rendered as Sprites and the shape was drawn into an image in memory ... but this might be useful.
Alternatively, depending on the complexity of the shapes you are attemping to work with, you could just export the vectorized version of the shape as a sprite (if they are fairly simple shapes you can export them low-res and just up-res them by scaling them upward, allowing you to have many more smaller images without sacrificing too much performance from memory consumption).
Now, you mentioned the wish to use Vectors to minimize the blurriness ... unfortunately, this can't really be done.
What you could do, however, is use Tile Maps -- I noticed your 'tower' is made up of some fairly common shapes, so the bulk of the actual tower could just be 'painted' onto a Tile Map and made up of many small high-res tiles ... you could then add the 'flare' (the thin lines, etc) as sprite overlays on top of it ... making each of them a separate sprite -- you could accomplish a number of different 'shapes' from a single piece of art by scaling it in different directions -- if the art is higher-res in the file then it is on screen the blur should be minimized.
Anyone else have any better ideas?