Jump to content
  • Advertisement
Sign in to follow this  
zagabar

OpenGL Help to begin with OpenGL

This topic is 4225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ;-) )

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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 :)).

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!