Help to begin with OpenGL

Started by
15 comments, last by scorpion007 17 years, 4 months ago
We are two intermediate programmers. We are making a game, but neither of us have any real experiance with grafic programming (except dos-based grafics in Pascal). We don't really know which grafic system we should use, but we are not going to use DirectX (problems in different OSs than windows :P). The game is going to be a actionbased arena-battlegame. There is going to be quite a lot of interaction between the characters. The view is going to be from the diagonally from the above (like Zelda 3, ultima online and others). The biggest problem we have is that we want the char to be able to turn around all the 360 degrees (at least most of them), thus we either need to make a lesser mountain of sprites or make 3D model. Is it easy to make a 3D model, and make it animate, collison detect and other stuff like that? As we have no experience at all with this, if you know any better way to solve our problem, feel free to tell them to us. Also do you know any good guides for learning OpenGL?
Advertisement
The ultimative guide for beginners in OpenGL is NeHE. Do the tutorials in order and you will get more experience. GameDev forum search is a great help too.

Edit: Corrected the link
-----"Master! Apprentice! Heartborne, 7th Seeker Warrior! Disciple! In me the Wishmaster..." Wishmaster - Nightwish
Thanks for the tutorials. We will look at them.

But what is wisest to use, 2D-sprites or 3D-models?
OpenGL is a graphics API. All it does is draw stuff to the screen. It won't handle collision detection or animation directly. You have to implement that on your own.

I would also recommend the OpenGL Programming Guide in addition to what has been mentioned previously. It is a great source of information and presented in a from the ground up approach to 3D graphics. The latest edition is available through nearly any book retailer like Amazon, Borders, B&N, etc... An earlier edition of the book is even available online in PDF format from the GameDev article section, I believe.

I know only that which I know, but I do not know what I know.
Thanks alot for the guide and help. Now regarding the other problem, is it easy to make simple 3D models and do you have any hints on doing it? Or is it the best and simplest to use sprites?

Also if we use OpenGL, how should we make sound, mouse and keyboard work, WITHOUT using DirectX?

(I am the other programmer ;-) )
Another question: How do I install open gl libraries so i can use them?
For capturing user actions you can process windows messages like
WM_MOUSEMOVE, WM_KEYDOWN ... if you are using win32 API.. For sound there is probably some utility library
Quote:Original post by Wertilq
Thanks alot for the guide and help. Now regarding the other problem, is it easy to make simple 3D models and do you have any hints on doing it? Or is it the best and simplest to use sprites?

Also if we use OpenGL, how should we make sound, mouse and keyboard work, WITHOUT using DirectX?

(I am the other programmer ;-) )


For sound, take a look at OpenAL. For models, there are several free or cheap modelling packages around, both high and low-poly oriented ones. However, using models, and especially supporting animations, is pretty math-intensive, and it takes some time to learn how to model. So, if you want to focus on making a game rather than learning how to build an engine or framework, I would go for 2D if I were you (which can be accomplished by using textured quads bytheway, you don't necessarily need to use a 2D API for 2D graphics :)).
Create-ivity - a game development blog Mouseover for more information.
Okay. But this textured quad-thing, we still need to draw a shitload of textures right? I mean one for the character facing straight ahead and one facing sideways and all the angles between.
That's right. You either do the math, or the drawing. Having that said, I wouldn't create images for all angles. Doing them in steps of 45 degrees is probably sufficient, depending on your movement system. It would be fine when the player moves the character with the arrow keys in their respective direction instead of rotating the character. You're not going to accomplish full rotation in 2D anyway and I agree it's a lot of work if your characters have lots of animations.

There may be other interesting possibilities though, such as using an existing 3D engine.
Create-ivity - a game development blog Mouseover for more information.

This topic is closed to new replies.

Advertisement