5

I'm fairly familiar with C / C++ / java, but I have mostly only ever done command line programming (with the exception of GUI in java).

I am really interested in 3D programming, but the problem I am having is I feel I know so little that I'm not even sure where to start so I am having difficulty searching for said resources.

I was hoping someone could point me in the right direction as to some resources / tutorials to get started.

I understand the two large platforms are OpenGL and Direct3d. My questions is which would be "better" to learn?

I originally started with a little OpenGl with some tutorials at http://nehe.gamedev.net but I later found out that most of the stuff there is depreciated / bad style.

I then learned the most recent version of OpenGL is 4.x, and my barely a year old VG card only supports OpenGL 2.x (HD 4890).

I would like to learn how to basically "walk" through some 3 dimensional environment, e.g. a maze.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Bob
  • 159
  • 1
  • 5
  • 2
    Your graphics card surely supports OpenGL 3, it's just the drivers that may be a bit outdated. But that's not really a problem, since OpenGL's extension mechanism allows to use newer features also from older versions. – datenwolf May 03 '11 at 08:15
  • HD 4890 is not barely a year old, April 2009 is two years ago. And @datenwolf is correct that all you need is a driver update, [according to wikipedia the entire HD4xxx series supports DirectX 10.1 and OpenGL 3.3](http://en.wikipedia.org/wiki/Comparison_of_ATI_graphics_processing_units#Radeon_R700_.28HD_4xxx.29_series). – Ben Voigt May 09 '11 at 14:20
  • YOu only really need to learn opengl2.1 anyway. Most of the new stuff in 3.0 and 4.0 is specialized, merging makers extentions into the mainstream or playing version number catchup – Martin Beckett May 09 '11 at 14:46

5 Answers5

1

OpenGL and DirectX share a lot of concepts, though if you want to be cross-platform, then OpenGL is certainly the better choice. Especially if you want to target newer platforms such as Android or WebGL.

You will probably find it easiest to start with a ready-made 3D engine rather than starting out with "raw" OpenGL. Some options to get you started:

  • If you have Java experience, it might be a good idea to check out jMonkeyEngine. It's a fully fledged OpenGL game engine (uses LWJGL under the hood, supports bullet physics, shader architecture, full SDK etc.) and it comes with some good example code.
  • On the C++ side, I heard good things about Ogre3D and Irrlicht in the past.
  • There's a big list of game engines on Wikipedia
mikera
  • 105,238
  • 25
  • 256
  • 415
1

I personally haven't worked with OpenGL, and I've only worked with DirectX through XNA, but from what I know, OpenGL is a somewhat easier than DirectX (not to mention cross-platform too) to learn, so that might be a better start. You don't have to worry about so many things like creating textures (e.g. with Maya) in a special format; you can just use a JPEG file or something to get it to work. I hear the Java Monkey Engine is good.

If you're using Windows and cross-compatibility isn't an issue though, certainly give Microsoft XNA Game Studio a try, it's great for beginning game programming -- fast but easy and powerful. (You'd need to learn C# though, but it should be easy, since you have more than enough experience.)

user541686
  • 205,094
  • 128
  • 528
  • 886
1

If you're more interested in 3D programming and not the underlying OpenGL/DirectX, I would start using some sort of framework or game engine, e.g. XNA, so that you're not worrying (as much) about low-level stuff. However, if you want to learn OpenGL or DirectX, I would start with 2D because it will still teach you the API, but it will be simpler (because again you're not having to deal with both 3D and an API at the same time), though you could get away with this if you're just making a simple maze game (as you say).

For modern OpenGL, the newest SuperBible covers it; http://www.arcsynthesis.org/gltut/ covers it; and http://www.swiftless.com/opengltuts/opengl4tuts.html covers it as well.

To answer whether OpenGL or DirectX is better, choose the latter if you're interested in any of or solely XNA/Xbox/Windows Phone, and the former if you're using Linux/want to write cross-platform games. I think the newer versions of OpenGL are similar to DirectX anyways.

https://gamedev.stackexchange.com/ can probably help you; there are a lot of questions aimed at beginners; see https://gamedev.stackexchange.com/search?q=beginner. http://www.gamasutra.com/blogs/LewisPulsipher/20110516/7453/So_Youre_Going_To_Make_A_Game_For_The_Very_First_Time.php also gives some nice advice (though its for game and not 3D programming)

Community
  • 1
  • 1
li.davidm
  • 11,736
  • 4
  • 29
  • 31
0

I really would start with XNA. There are already some good 3D libraries and tutorials out there.

e.g. http://msdn.microsoft.com/en-us/library/bb197293%28v=xnagamestudio.31%29.aspx http://www.nfostergames.com/XNAQuickStartEngineWalkthrough.htm

And Library example:

http://quickstartengine.codeplex.com/

BitKFu
  • 3,649
  • 3
  • 28
  • 43
  • I actually did walk through some of the 2D XNA tutorials a while ago, and I agree they were very easy to learn. Are you limited to releasing for the xbox 360 / windows phone? I know it "is possible" to publish for the PC with XNA, but how practical is it? Not that I plan on publishing a game, but I would like to learn something that isn't limited to one or two platforms. Thanks – Bob May 03 '11 at 06:33
0

This: http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160 is a great book for learning "modern" (aka shader based) graphics programming with DirectX. There's also a newer DX10 edition that I'm sure is good as well but I have not actually looked at it.

I'm not aware of an equivalent OpenGL book, maybe somebody else can suggest one. Once you master the basic concepts though (vertex buffers, shaders, render states, etc) it's not very difficult to move between GL and DX since they're both basically interfaces to the same graphics hardware.

eodabash
  • 959
  • 2
  • 8
  • 24