I know you specifically said against using vector-based graphics formats,
but that’s probably the best way to go, since you’ve already cancelled out
The vector based approach can do wonders for this kind of thing –
especially since you’re targetting both Linux and OSX. Using a vector-based
approach will allow you to better support the wide-screen 16:9 OSX supports,
aswell as the traditional 4:3 monitors. If your main concern with using
vector-based formats is the artists working on your project (be them others,
or yourself), having experience with vector-based drawing, there are tons of
tools out there that will convert from rasterized to vector (off the top of
my head, Corel has like 8 different programs that do this, but I’m sure
there’s gotta be some open-source solutions out there).
In reality, rendering vector-based formats is a breeze – you just have to
remember to keep all your units in vector space (floating point), and map
the vector space to screen-space at runtime. The only thing that changes
from resolution to resolution is the mapping. If you want your mapping to
be piece of cake, use a double-precision-based (‘double’ in C/C++), and have
your screen space be represented from [0, 1] in it – that way you just have
to multiply your screen dimensions to the vector inorder to get pixel
If you’re a particularily crafty programmer, and want your game to look
really good, you could even go so far as to do some optional (i.e. make sure
to make a checkbox for it somewhere) anti-aliasing on it, too, and provide
those with decent CPUs to see a little better detail even at low resolutions
(bad video card and 1.8Ghz processor? No problem!).
Oh, and, on another plus-note, vector-based graphics tend to create smaller
data than rasterized ones. I mean, for a 100x100 pixle circle colored in
RGBA, it’d take at least 40000b of space, but might take as little as 35b in
vectorized form (be they in memory, on disk, or being transfered over the
Just some food for thought.
- Silicon> ----- Original Message -----
From: firstname.lastname@example.org (David Bishop)
Sent: Monday, October 27, 2003 4:02 PM
Subject: [SDL] vector graphics
I am working on a game that displays stuff to the screen (do I get points
the stupidest opening line ever?). I would like my graphics to be “big”,
matter what resolution the user is running in, but I would prefer to not
set the video mode to 640x480. I had to use a monitor for several years
would only sync at 1152x864 at 75Hz, so I’m sensitive about forcing a
rez I figure that if I used only vector-style graphics (svg,
pdf, etc), it would be easy. However, what’s the best way to do that,
cross-platform? I really only care about linux and OSX, but whatever I
up with has to run on both. And, if there is a way to do what I want
one picture that displays equally as ‘large’ on any rez display) without
using a vector-based graphics format, I’m open to that as well! No close
Any pointers or suggestions would be gratefully appreciated. Thanks!
SDL mailing list
SDL at libsdl.org
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.530 / Virus Database: 325 - Release Date: 10/22/2003