Skip to main content
GameDev.net gamedev.net
🔒 Locked

Vector graphics programming

Started by Dodgy Bob Nov 11, 2000 at 4:20 AM 6 replies 550+ views
Original Post
Dodgy Bob
Dodgy Bob
Hi! I''m starting out on this whole "games programming using DirectX" thingy and have pretty much got a handle on the basics. What I want to do as my next step is write a version of one of my all time favourite arcade games - Star Castle. However, everything I''ve learnt so far uses bitmaps, etc. Star Castle uses vector graphics. Does anyone know where there is a decent tutorial on Vector graphics? Cheers.
Heraldin
Heraldin
If you''ve got a DirectX SDK, look at the documentation on Direct3D Immediate Mode. It should have tutorials and samples. If you want 2D vector graphics, use D3DLTVERTEX as the vertex-type and set the z-coordinate to something neutral like 0.5

Dave
Dodgy Bob
Dodgy Bob
What are you talking about????!!!!! Me no understand de lingo ;-)

I need a tutorial on 2D Vector graphics programming. Not just how to do it, but terms and such like. Very, very basic. It''s nothing to do with Direct3D is it?
daveb
daveb
Hate to break the news to you, but unless you''ve got some custom hardware, you can''t do real vector graphics on your PC. By definition, you''re dealing with raster hardware (ie, pixels). Vector graphics implies hardware which draws lines explicitly on the picture tube.

However, you _can_ simulate vector graphics by simply using lines to draw your objecs with. Take a triangle, draw its outline, and voila, almost-vector-graphics.
Volition, Inc.
Dodgy Bob
Dodgy Bob
Oh bugger. Well, if I was to do that then how do you work out collisions? If I plot two points and draw a line between them (and that line moves around the screen) how do I work out if a sprite hits the line? BTW - I''m totally useless at maths.
alexk7
alexk7
I have the same problem, I would like to do something similar to Flash or Illustrator graphics but in a DirectX game. Where can I find info about how to transform curve equations into anti-alised, good looking shapes on the screen ? Direct3D is not what I call vector graphics...
alexk7
daveb
daveb
Most 3d graphics books have large sections on various types of splines. I highly recommend "3D Computer Graphics" by Watt, or good old Foley and van Dam. To get curves onscreen typically what you do is make yourself a spline and connect a bunch of lines along the length of it, subdividing until you get the required curviness.
Volition, Inc.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.