PDA

View Full Version : what's the best or a good game programming language?


plutoniumman
06-13-2004, 04:05 PM
What would the best programming language to make games be?

mindlessLemming
06-13-2004, 04:32 PM
I believe you'll be looking for C++ initially, and I think there may also be other languages you need to learn to integrate with things like Auran Jet or Direct X...
a real coder will come give you a more definitave answer any minute now, I just know what I hear in the halls ;)

whackaxe
06-13-2004, 08:34 PM
C++ is the most used. it's not TOO hard to pick up if you've got at least some experience. as for DirectX, they are just libraries(?) that you use as an interface to the hardware which largly simplifies the task. i hope what i just said was right :p

plutoniumman
06-13-2004, 10:14 PM
So C++ or directX would be the best to make games?
Can C++ or directX make 3D and 2D games?

whackaxe
06-13-2004, 11:05 PM
directX is a set of librabies USED IN C++ (just thought i'd clear that up)

i think they can. or you can use openGL but diect X handles soudnds, input, grfx, controllers etc.

www.gamedev.net has more complete answers

gsnedders
06-14-2004, 12:30 AM
DirectX is Windows only, OpenGL is Windows, Linux and Mac OS X.

plutoniumman
06-15-2004, 02:28 AM
Ok, so would openGL be the best choice for making a game?

whackaxe
06-15-2004, 11:37 AM
the directX vs. openGL argument is as nearly redundant as PHP vs. ASP. it's all up to choice. if you intend on using C++ i suggest http://cboard.cprogramming.com games forum

directX is windows only BUT manages everything you need in a game (mous, keyboard, grfx, sound etc...)

openGL is multiplatform BUT you will need other libraries for sound controllser etc...

Serex
06-15-2004, 01:53 PM
Im currently doing a College degree of interactive entertainment specialising in game programming.

the first semester we started using javascript. i dont know why but i think it was just to get us used to the language type. this semester we have gone into c++. it isnt as hard as most people make it out to be but is still alot more involved than javascript.

i still need to google all functions to find out what header files to include. Is there anyway i can get a list of them?

just make sure you purchase some decent books to help you. :thumbsup:

plutoniumman
06-15-2004, 02:10 PM
ok, thanks for the help Guys!

obiwanjabroni
06-16-2004, 12:22 AM
C++ is the most common game programming language for good reason. Yes, all you Java fanatics, java is great, clean. However, it is also slow, difficult to make portable to machines without carrying the VM with it, and restrictive (yes, I said restrictive). C++ allows a lot more direct access to memory registers and such, and as a result, is important for game developers who need to optimize code so you don't need bleeding edge hardware to play the game.

Therefore, C++ is a good choice for the core language of your game. Another good thing about C++ is that processor intensive components of your game can be sped up by adding "__ASM" blocks so that you can run assembly for those areas. You can also use registers in C++, which speeds up variable management.

As for the 3D component, there is no "3D Programming Language", only libraries. The most common two nowadays are the Direct3D graphics libraries (one component of directX) and OpenGL. Being a beginner, I would recommend OpenGL, not because it's better or anything, simply because it's simpler to learn. It's approach is much more direct. Take a look:

Do you want to start with code like

CoCreateInstance((void**).....

or with code like

glBegin(GL_TRIANGLES)...

OpenGL is definitely the graphics library to start learning from. As for sound and input, you can integrate DirectSound (for .wav and .mid files), DirectPlay(for .mp3 files and movies), DirectInput (for joysticks, instant keyboard and mouse inputs), and DirectPlay (for multiplayer port and packet management). There's no rule that says OpenGL and non-graphical components of DirectX can't mix, and by doing this, you learn two approaches: OpenGL's state-machine approach and the massive dereferencing and pointer approach of DirectX interfaces.

Oh, one more thing. Make a big effort to learn pointers and classes. They are critical in game development. Pointers leads to a better alternative to arrays in game programming (linked lists) and classes make everything work smoothly and sensibly.

plutoniumman
06-17-2004, 03:23 PM
ok, so I should start to learn openGL?

Mhtml
06-18-2004, 08:54 AM
OpenAL is a good sound library, I used it back when I learnt OpenGL.
And as for OpenGL being simpler than Direct3D, I don't think I could even begin to disagree. . . Well I could I guess, OpenGL does make it harder if you want more power whereas DirectX gives loads of flexibility but it's bigger.

http://nehe.gamedev.net -- Best place to being OpenGL, I would suggest going to www.winprog.org/tutorial first if you haven't learnt how to make a window in Windows.

Also the GameDev.net forums are teeming with life and you will find heaps of support for your questions in the begginers forum! :)

Mhtml
06-18-2004, 08:56 AM
DirectX is Windows only, OpenGL is Windows, Linux and Mac OS X.
It runs on normal OS systems and IBM OS/2 systems as well if I'm not mistaken (which I'm sure I'm not) ..

Mhtml
06-18-2004, 08:59 AM
there anyway i can get a list of them? Well it depends on the functions. Most of C/C++ ones can be found at www.cplusplus.com, the windows ones you can find at www.msdn.com ... Or get the Platform SDK for offline referene (it's big, like 200Mb+)..

obiwanjabroni
06-18-2004, 09:23 PM
Well, it depends on how you think. I learned OpenGL first and after working with directx interfaces, I think that the openGL statemachine is more intuitive that all the dereferencing of pointers associated with D3D, and other DX things.

As to the original post, you probably want to learn C++ first, object-oriented concepts in C++, and THEN proceed to OpenGL.

plutoniumman
06-19-2004, 04:10 AM
So I should learn C++ then openGL?

whackaxe
06-19-2004, 11:05 AM
yep. and i suggest this to start you off:

www.cplusplus.com/doc/tutorial/
www.cprogramming.com

plutoniumman
06-20-2004, 06:57 AM
sweet!

thanx for your help every one!