Jump to content
  • Advertisement
Sign in to follow this  
Sean_Seanston

OpenGL Unsure how exactly to properly begin with OpenGL and 3D Maths/Games

This topic is 2302 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

I know this must be a common theme here and there's a helpful Getting Started box at the side, but I'm wondering about a few things that I thought I'd ask some more experienced coders about and have a better idea before going down the wrong route.
Sorry if it winds up being longer than maybe it should be.

Firstly, a summary of my experience in game development/general programming so far:
- Started trying to get into game development seriously about 4-5 years ago.
- That consisted of starting by learning the basics of C++ (something I admit I regret starting with now, in typical fashion), then moving into how to create 2D games with Direct3D (again, something I regret that caused me no end of beginner frustration and lost time but you live and learn).
- I made a few basic 2D games like that, such as Pong, Tetris, Breakout, Space Invaders etc.
- I've also recently completed a Computer Science degree, during which I learned mostly Java but also did 2 game projects in C++ with DirectX that were great learning experiences but didn't exactly turn out as I'd hoped, largely due to my wrong-headed way of approaching things (overcomplication and such beginner mistakes) and sticking with that combination of language and API that perhaps I should've abandoned earlier for something more user-friendly and forgiving.
- As you can tell, I've decided I somewhat took the wrong path in learning game development for longer than I would've liked. Recently I've tried my hand at game development in Java, messing around and making a basic 2D platformer engine of sorts using Slick 2D. That was a nice exercise but I couldn't think of a great deal to do with it and was having trouble coming up with 2D game ideas I found interesting.

Where I am now:
Recently, I've taken more of an interest in the 3D and more mathematical side of things. Properly understanding the concepts involved in 3D games (and pseudo-3D effects involving maths like Mode 7 or just interesting effects in general) has always been a goal of mine but I've never been able to figure out where exactly to start, and then how exactly to progress through it in a logical manner that lets me cover what I need to know and not get lost and be unsure where to turn to get a grip on what I'm not understanding.
I've been going through the tutorials for jMonkey, and while it looks like an interesting and straightforward tool, it's not exactly where I want to be going since it's understandably skipping over the complicated stuff that I'd rather not have as a mysterious black box in my head for the rest of my life and so it just feels like more avoidance of what I need to be studying and finally understanding.
Getting a simple 3D gameworld up and running with a few easy steps is nice but it feels a bit shallow and unrewarding because I'm not really learning much and I feel most of it is always going to be hidden.

From here:
I suppose right now I'm more interested in feeling confident with understanding the technical concepts behind 3D games and the underpinning 3D maths than actually realizing any specific 3D game ideas e.g. by taking a shortcut through something like jMonkey.

I've had a bad start with Direct3D and heard some people say OpenGL can be easier to learn etc. so I think OpenGL would be a good choice to study. I know you can use OpenGL through Java with JOGL and LWJGL and I've heard the bindings make it nearly the same as using OpenGL in C++.
Would it be advisable to start with OpenGL using Java, or would starting with C++ be better practice somehow? I think I heard people say following C++ OpenGL tutorials would work alright for OpenGL with Java since the function calls are meant to be the same or thereabouts.

Either way, where should I start and how should I continue? I looked on the Wiki, it doesn't have many tutorials though the Getting Started section seems to have some useful links, and I'm not sure what OpenGL version I should be using.
Should I jump into OpenGL, or are there a lot of 3D concepts I really need to cover beforehand?

This looks interesting but doesn't really seem to cover much actual OpenGL, just lots of general 3D concepts:
www.arcsynthesis.org/gltut/

I'd like at first to work up to developing some kind of simple strategy game or maybe shoot 'em up on a 3D landscape of some kind. Maybe a basic clone of some early flat-shaded 3D games like on Amiga.
I've noticed some people do 3D (or pseudo-3D) games from scratch for Ludum Dare. They've interested me and I've looked at the code sometimes but without real experience in that kind of thing, it hasn't helped.

Thanks for reading. I hope I made things clear enough.

Share this post


Link to post
Share on other sites
Advertisement
If you want to start with java i dont see why not! LWJGL is basically a wrapper around OpenGL so you can use it in Java. All the methods and calls are literally 99.9% the same, the only difference is that many of them are preceded by GL11.openGlFunctionNameHere.

As for mathematics you dont INITIALLY need to be very well versed in it if you are starting to learn OpenGL, but you will want to be well versed with things like matrix's, vectors, quaternions, planes, essentially linear algebra.

I know some examples of LWJGL are hard to find on the internet, but basically its exactly the same as opengl so any opengl example you find in C++ you should be able to EASILY convert to LWJGL + java. If you are really interested PM me with you'r email or some way to contact you and I will be more than happy to take an hour or so to guide you through setting it up initially and transfer you some of my own source code so you can get started.

Share this post


Link to post
Share on other sites

If you want to start with java i dont see why not! LWJGL is basically a wrapper around OpenGL so you can use it in Java. All the methods and calls are literally 99.9% the same, the only difference is that many of them are preceded by GL11.openGlFunctionNameHere.


Cool, I thought I more or less heard it was like that.

I know some examples of LWJGL are hard to find on the internet, but basically its
exactly the same as opengl so any opengl example you find in C++ you should be able to EASILY convert to LWJGL + java.


Right. I suppose I'll install LWJGL and see how to set that up, then try to start whatever OpenGL tuts I can find.

Is it important what version of OpenGL is being used? I think I heard NeHe's tutorials used to be good, but that they were horribly out of date with modern OpenGL good practice or something to that effect and that it wasn't a good idea to use those anymore.

Are there any particularly good reference books or the like that cover most of the important stuff in OpenGL? I just wish I could find most relevant stuff in one place.

If you are really interested PM me with you'r email or some way to contact you and I will be more than happy to take an hour or so to guide you through setting it up initially and transfer you some of my own source code so you can get started.


Thanks, I'll send a PM if I get into much difficulty starting out.

Share this post


Link to post
Share on other sites
The book that got me started on OpenGL Programming (which I would highly recommened is OpenGL Game Programming By Hawkin/Astles. Though I think there are probably newer books that would be better for the current times. But I did find it a very easy and enjoyable read myself.

As far as the nehe tutorials alot of the stuff is still good, except there are certain things that are dated, some of which you wont have to worry since you are working with Java, LWJGL. But for the most part you can still learn alot from them.

You don't really have to worry what OpenGL you'r using if you are going down the LWJGL route. They will provide you with the DLL's and libraries you will need to get started. Whatever you do, don't get discouraged, I say this because I remember when I started I would find myself so frustrated that the simplest examples I could never get to work (I.E setting up my environment to use LWJGL and render a triangle!!!). But that's part of the learning phase and you will find that alot of these issues will have relatively simple solutions.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!