View Full Version : Vector-like graphics in C++?
06-18-2005, 02:01 PM
I'm trying to help a friend the best way i can so please bear with me. So here's the deal. My self and two friend are planing on making a simple game using vector-like graphics (like on the MB Vectrex). One of us is in charge of programming and he doesn't have a clue on how to do this. As of now he is trying the SDL libraries (i think it's called that) and C++ is the language. Us other two are in charge of planing the game mechanics, graphics and such.
My question is if there are any tutorials online or if anyone has a clue of as to how we can get vector objects on screen (like ships and stuff) that also needs to be rotated i real time.
I'm sorry i can't be more precise about this and this is due to my lacking any programming skills. Any help would be appreciated. Thanks!
06-20-2005, 12:47 AM
SDL helps you a lot with getting input from keyboard / mouse, playing sounds, timers, etc..
The graphics-functionality of SDL however is (more ore less) strictly 2D, means you can only draw pixels (if you type down one of the tutorials in the manual), or do some basic blitting (putting one image into another one - for short).
If you want to do 3D, use OpenGL. If you use SDL that's the best choice, because you will stay plattform-independent with this. The Alternative to OpenGL / SDL would be DirectX, which - IMHO - is a pain to program (but there are a lot different opinions on that).
So - start off with the tutorials provided in the SDL manual (the input tutorial helps a lot) and after that have a look at nehe.gamedev.net . The tutorials provided there are quite good and easy to understand. Further readings would be the article-section of www.gamedev.net or www.gamasutra.com, the opengl redbook (available at www.opengl.org) and - of course - books, books, books :)
06-20-2005, 04:36 PM
Along the lines of the previous poster, if you're using SDL, you can init the display as an OpenGL display. One of the things built-in to OpenGL is the ability to draw Nurbs curves and surfaces. I'd give that a shot.. for more information on it, try googling for the OpenGL red book (I think the red book is tutorials, and blue is reference, but I might be backwards). Then look for the chapter on Nurbs evaluators. This should give you a good idea on how to get a true vector object to draw to the screen.
06-21-2005, 07:09 PM
Ok thanks guys,
This seems like a good start and i will convey it to my friend and hopefully we will get something to work. =)
06-21-2005, 07:09 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.