Game Programming and Development Tools

opengl or directx? – bennythebear

bennythebear

Member

Posts: 1225
From: kentucky,usa
Registered: 12-13-2003
ok. i have two questions i would like answered. i'm currently learnign vb.net, but eventually want to learn either c# or c++. which leads to my first question, for game development which would be the best language of the two to learn, c++, or c#. to me, "best" would be mean has the most resources to use/learn, and which would be the most flexible. i'm pretty sure all the asp and database stuff i'll be doing i can do in vb, but i believe vb would be a stupid choice for serious(professional) game development. i'm pretty sure if i made a game in vb, and made the same one in c++ the one in c++ would require less system resources right? guess that's 3 questions. anyway, any help would be appreciated...i know since i've been a member here i've asked a whole lot of questions.

------------------
proverbs 17:28
Even a fool, when he holdeth his peace, is counted wise: and he that shutteth his lips is esteemed a man of understanding.

proverbs 25:7
open rebuke is better than secret love.

www.gfa.org - Gospel for Asia

www.persecution.com - Voice of the Martyrs

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
interesting title...

I'd say DirectX, but that wasn't the answer to any question...

C++ or C#, why not both? C++ definately for Games Development, you'd find it very hard getting a job as a programmer at a games studio without C++ knowledge and experience.

Game in VB, same on in C++, C++ one require less system resources. If your talking about size, yeah, C++ would most likely leave a smaller footprint on the system. However the C++ one would most likely be a heck of a lot more complex then the VB one.

3 questions?? I can only spot 2...

[This message has been edited by dartsman (edited October 04, 2006).]

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
quote:
Originally posted by dartsman:

3 questions?? I can only spot 2...

The title had the first one and there are two questions in the post it self.

I'd start by learning C++ because its still widely used and will be used for a long time and C# isn't much different so you can move to that quite easily.
Then for that openGl would be nice because its cross-platform but direct-X maybe easier to learn considering how many books and tutorials there are.

I dont know about the resource usage, there was some discussion about this here in CCN but I wouldnt worry about it.

------------------
1Jo 2:9-10 He that saith he is in the light, and hateth his brother, is in darkness even until now. 10 He that loveth his brother abideth in the light, and there is none occasion of stumbling in him.
Joh 17:26 And I have declared unto them thy name, and will declare it: that the love wherewith thou hast loved me may be in them, and I in them.

[VoHW] (Help needed) [Blog] - Truedisciple (mp3)

[This message has been edited by jari (edited October 04, 2006).]

[This message has been edited by jari (edited October 04, 2006).]

bennythebear

Member

Posts: 1225
From: kentucky,usa
Registered: 12-13-2003
thanks for the responses...there should've been 3 questions, but i forgot to ask about opengl or directx...which is what my title was...i'm brilliant like that . i was thinking of going c++ and directx for game development, i just wanted to make sure that was the best solution for me. it will be a while before i can dive into c++ or directx though. i'm still furthering my knowlege in vb.net, and several things related to website design(frontpage,dreamweaver,fireworks,flash, etc..) right now i have a frontpage and fireworks class in college. so my learning plate is full right now. anywho, thanks for the great answers to my very unclear questions.

------------------
proverbs 17:28
Even a fool, when he holdeth his peace, is counted wise: and he that shutteth his lips is esteemed a man of understanding.

proverbs 25:7
open rebuke is better than secret love.

www.gfa.org - Gospel for Asia

www.persecution.com - Voice of the Martyrs

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
DirectX/C++ would be a good choice, I started out with OpenGL however, and found that pretty easy to use. DirectX is very very good, and maybe when you get started you'll be learning DirectX 10 :P

Get the book Introduction to Game Programming with DirectX 9.0 by Frank Luna. It's a really good book for getting started in DirectX 9.0. Also for C++ I'd recommend C++ Black Book by Steven Holzner[/url].

I love that black book, read it through fully only just a month ago...

If you have any C++/DirectX specific questions you can post them on the Project [N] Resource Forum. I'm an admin there (one of 3 :P only 2 of us are active though), and I regularly check the forums.

------------------
Programmer - Team KAIZEN

luke

Member

Posts: 311
From: I use your computer as my second Linux box
Registered: 10-30-2005
Well, heres what I've got to say:

DirectX: A bit more complex, but once you get the hang of it, its easy.
It has semi high level functions, for loading X files etc.

OpenGL: Deceptively more simple. But you will have to write your own routines for loading meshes/textures etc. Although I wouldn't be surprised if there was a plugin for that kindof stuff.

C++ is more complex than C#. C++ is however more powerful/faster/dangerous.
There is no reason why you can't learn both C++ and C#. This is a non issue

------------------
If you can see Chuck Norris, He can see You.
If you Can't see Chuck Norris, you may be seconds away from death.

SSquared

Member

Posts: 654
From: Pacific Northwest
Registered: 03-22-2005
I was recently at Borders browsing the game development books. I'd say roughly 97.1483% of the books were in C or C++. There were maybe 3 books with Java. I certainly do not think there were any in C#. Most any game dev job is seeking C++ devs. It seems like the current language of choice is C++ for game development.

But who knows. The playing field may change. Microsoft is really pushing XNA and it seems like people are hot on the development trail. There are already many tutorials and samples out there. It's been a month and there are already physics engines, terrain help, and lots of other really nice 3rd party work. I know I haven't been too hot on XNA, but I'd say it's picked up pretty well in the community. I may even head back to it after the final release in December.

I have almost no advice on DirectX or OpenGL. Just that OpenGL is cross-platform. In either case, if you are looking for a game dev position, having created a game with either API seems like good experience. Someone correct me if I'm wrong, but it seems (to me) like using DirectX or OpenGL isn't so much the issue as much as understanding coordinates, mesh, textures, etc.

I think it's a good idea for everyone to have an understanding of C and C++. They both help you understand some of the underlying workings of code. Having that background can really help in understanding higher level languages like Java and C#.

steveth45

Member

Posts: 536
From: Eugene, OR, USA
Registered: 08-10-2005
I would suggest starting with something a little higher level than OpenGL and DirectX, like a 3D engine. You can save yourself a lot of time and heartache by using a game engine. A game engine will do things like load a mesh from a file, without forcing you to write your own file loading code for the mesh format and associated image formats (no small task). Unless you are planning to get a job as a game engine programmer specifically, check out Irrlicht or Ogre3D--they are both free. Or, if you are making a 2D game, you'll do fine with DirectX or OpenGL. Even in serious game development, only a fraction of the programmers deal with low-level rendering API stuff. The wheel's already been reinvented 10,000 times.

C++ and C#, learn them both, and it probably doesn't matter which order you do it in.

Nobody has answered your last question, even though the answer is obvious. C++ is more efficient with system resources, both memory and CPU usage than C# or VB.

------------------
+---------+
|steveth45|
+---------+

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
quote:
The wheel's already been reinvented 10,000 times.

Doesn't mean people stop buying new tires... :P haha

Yeah, a heck of a lot of people have re-coded stuff that they didn't need to do. But then again why have you stepped into learning C++? When you could have been using say 3D Game Studio where you only need to know C-Script? (No offence to 3DGS users, David, I didn't mean bad of it, you know what I mean, otherwise chat with me on MSN, where you been lately?? :P)

I do get where your coming from steve, but most of those 'reinventing' is for the sake of learning. It's why good programmers know how to create say a data structure like a linked list or array (template array, not the standard array :P haha) of their own. Although they can still use STL's list, for the sake of learning and understanding we 'reinvent'. Otherwise we'd just all be script kiddies :P

You'd actually find it a lot easier to move from OpenGL/DirectX into an engine as you would most likely have a higher level of understanding of whats 'behind the hood'. Moving from an Engine down to OpenGL/DirectX could still be easier then no prior usage of an Engine, but then from the engine you have been 'sheltered' from whats really there...

Don't take this over the top and start looking into machine code, unless thats something your interested in (it's pretty cool btw). But the lower you go the more understanding you will get, but don't take it too far if your serious about getting into game development. The best reference to what you'd need to know to get a job as a game programmer is to look at the companies you'd love to work for, and look when they have programming positions what they require of a games programmer.

Heres an example of the requirements for a game programmer for a top Australian Games Company, Auran (www.auran.com):

quote:
Essential Duties and Responsibilities
Produce technical design documentation and provide estimates;
Develop game code and technologies;
Adhere to project policies and coding standard;
Ensure code and documentation is of a high quality;

Required Qualifications
Tertiary education in a related field (e.g. degree or diploma in Engineering, Mathematics, or Computer Science);
Minimum 4 years experience in a Software Engineering Role;
Strong C++ programming skills;

Desired Attributes
2 Years experience in game development or at least one completed title;
A passion for MMO role playing games, and competitive PVP;

Language Skill
Good written and oral communication skills required.


A note with experience/education. You can get into the company through doing programming as a hobby programmer. You just have to show that you have that you have the amount of skill which people would have gained over that time. In other words, you need to impress the heck out of them :P hehe

quote:
Nobody has answered your last question, even though the answer is obvious. C++ is more efficient with system resources, both memory and CPU usage than C# or VB.

I stated earlier on that which I believed I had answered the question. However I can see how you did answer the question a lot clearer :P hehe

"Game in VB, same on in C++, C++ one require less system resources. If your talking about size, yeah, C++ would most likely leave a smaller footprint on the system. However the C++ one would most likely be a heck of a lot more complex then the VB one."

------------------
Programmer - Team KAIZEN

bennythebear

Member

Posts: 1225
From: kentucky,usa
Registered: 12-13-2003
thanks for all the info. i'll think i'll end up going with directx/c++ or c#. it would be nice to be able to make a complete mod for a game, instead of just changing certain things in scripts(ie. dungeon siege). again, thanks for all the help.

------------------
proverbs 17:28
Even a fool, when he holdeth his peace, is counted wise: and he that shutteth his lips is esteemed a man of understanding.

proverbs 25:7
open rebuke is better than secret love.

www.gfa.org - Gospel for Asia

www.persecution.com - Voice of the Martyrs

ArchAngel

Member

Posts: 3450
From: SV, CA, USA
Registered: 01-29-2002
quote:
I was recently at Borders browsing the game development books. I'd say roughly 97.1483% of the books were in C or C++. There were maybe 3 books with Java. I certainly do not think there were any in C#.

for what it's worth, having used both Java and C#, I'd much sooner make a game in C#.

------------------
"Patience, my good citizen, patience. It's bad enough to rob a man of his dream"
-Sydney Carton, Tale of Two Cities
Soterion Studios

SSquared

Member

Posts: 654
From: Pacific Northwest
Registered: 03-22-2005
quote:
Originally posted by ArchAngel:

for what it's worth, having used both Java and C#, I'd much sooner make a game in C#.

Agreed. At this point, C# seems the better way to go for games. I suspect by early next year, the 3 to nothing lead Java has will be surpassed with C# and XNA books.

steveth45

Member

Posts: 536
From: Eugene, OR, USA
Registered: 08-10-2005
quote:
Originally posted by dartsman:
Yeah, a heck of a lot of people have re-coded stuff that they didn't need to do. But then again why have you stepped into learning C++? When you could have been using say 3D Game Studio where you only need to know C-Script?


Professional game studios generally use game engines but do most of their work in C++, not those scripting languages. From conversations with guys that work at game studios, they spend more time linking technology to technology. For example, if you get hired at a game studio, you'll much more likely do something like link a 3D rendering engine to a physics engine than write either from scratch. Getting used to mid-high level API's and understanding how scene nodes and such work is more important than writing optimal OpenGL rendering code or whatever.
quote:

I do get where your coming from steve, but most of those 'reinventing' is for the sake of learning.


Obviously. I'm just saying that it is just a small subset of game programmers that do low level rendering code. If that's what you want to do, go nuts, but it's not necessary or even the most useful route. I've spent a great deal of time with OpenGL, and I learned plenty. I interviewed for a position at a game studio for a game engine programming position. They weren't excited about my OpenGL experience, they wanted someone to write shaders, and I hadn't done any of that, yet.

It you want to talk about low-level, I'm currently debugging 6502 assembly to figure out some of the equations used in the NES game Dragon Warrior. I'm not doing it to learn assembly (I already know that), but from a game designer's perspective, I want to get a glimpse at the math behind the well-balanced game play. I can already tell you how it calculates the damage given based on the attacker's "Attack Power" and the defenders "Defense Power". I can also tell you how to multiply 16 bit unsigned integers on an 8 bit processor that only has addition, subtraction and bit shifts.

------------------
+---------+
|steveth45|
+---------+

dartsman

Member

Posts: 484
From: Queensland, Australia
Registered: 03-16-2006
quote:
Professional game studios generally use game engines but do most of their work in C++, not those scripting languages. From conversations with guys that work at game studios, they spend more time linking technology to technology. For example, if you get hired at a game studio, you'll much more likely do something like link a 3D rendering engine to a physics engine than write either from scratch.

I never said professional games studios use a specific scripting language. I was making a point in that statement about why we do 'reinventing' tasks. I actually had a 12 week internship at Auran as a programmer (C++). We were in a team working on a prototype project. I coded the camera system (quaternion) and an animation wrapper for the engine we used, also working with the animators for exportation of models. I also did a fair bit of documentation and controlled the daily build towards the end of the project.

quote:
Getting used to mid-high level API's and understanding how scene nodes and such work is more important than writing optimal OpenGL rendering code or whatever.

Definately, having the experience of using middleware engines/libraries is of great importance. But for me, writting a wrapper around Novodex/ODE wasn't as fun as coding my own 2D rigid body physics system. Or writting my own 3D rope simulation code (using the constaint based verlet intergration method), which turned out to be a lot faster (fps wise) and less painful attaching objects to it then using Novodex/ODE...

quote:
Obviously. I'm just saying that it is just a small subset of game programmers that do low level rendering code. If that's what you want to do, go nuts, but it's not necessary or even the most useful route. I've spent a great deal of time with OpenGL, and I learned plenty. I interviewed for a position at a game studio for a game engine programming position. They weren't excited about my OpenGL experience, they wanted someone to write shaders, and I hadn't done any of that, yet.

True, a small subset of games programmers do only touch any low level rendering code, but that doesn't mean the rest haven't used directx or opengl (or the like) in the past. Most games programmers I've meet have done their game demos with either of those two, or written their own. These are guys from THQ, Auran, Pandemic Studios, Halfbrick, Krome Studios, etc... Maybe Australian games programmers are totally different from the US games programmers? That sucks about the job, however the company should have specified that they were looking for someone for a 'graphics' programming position, so the company would definately be in fault if they advertised the position as a games programmer (or even just programmer) without a more detailed description of what they expected...

quote:
It you want to talk about low-level, I'm currently debugging 6502 assembly to figure out some of the equations used in the NES game Dragon Warrior. I'm not doing it to learn assembly (I already know that), but from a game designer's perspective, I want to get a glimpse at the math behind the well-balanced game play. I can already tell you how it calculates the damage given based on the attacker's "Attack Power" and the defenders "Defense Power". I can also tell you how to multiply 16 bit unsigned integers on an 8 bit processor that only has addition, subtraction and bit shifts.

Reverse engineering... cool... Still your doing it for the sake of learning :P hehe. Good for you (no really) if you can tell me how to do those things, personally those aren't of interests of mine and so you won't have to

I just wanted to get the point across that personally for ME, I didn't get to using Ogre easily until I had some experience with API's such as DirectX and OpenGL. Sure using an engine is fine, and if you wanna do that then fine. Physics and Sound engines are a different thing for me. I did start out on using Physics/Sound engines/libraries before learning how to make my own...

------------------
Programmer - Team KAIZEN