Sign in to follow this  
Hammonjj

Trouble Getting Started

Recommended Posts

I've been programming in many languages for a few years now: C++, PHP, Cocoa, Objective-C, to name a few, but I've never been able to make the connection to game programming. I think I understand the basics of C++, but how do you use that to make a game? I have an older book on game programming, but the author isn't very good and his code is full of mistakes. Can anyone point me to some tutorials or a book on creating games using C++? Also, what kind of API should you use for game creation? OpenGL, Directx, SDL, ect. I'm very confused on this subject. I just can't seem to make the transition into the game world.

Share this post


Link to post
Share on other sites
Quote:

Also, what kind of API should you use for game creation? OpenGL, Directx, SDL, ect.

That depends on what you plan to do.

SDL is very good for 2d games, and uses OpenGL behind the sciens for
portability. SDL is also easy to use.

DirectX is Microsoft only. It is Object orianted, and a direct to hardware API.
It is powerful, and is a little faster on Windows machines then OpenGL.

OpenGL is not object orianted, but is very portable, and powerful.

Both DirectX and OpenGL are 3d "high end" APIs. I personally prefer OpenGL,
but the API to choose is based on personal opinion.

btw, You can also create a software renderer (No APIs). As you have never done
game development, I highley recommend *not* doing this.

Quote:

Can anyone point me to some tutorials or a book on creating games using C++?

Gamedev.net books section lists alot of good books.

Game programming start to finish
-Nver used it, but it looks quite good

Game programming all in one

Also, there are *alot* of tutorials, and articals on the internet.

I originally learned from Teach youself game programming in 24hr
and Tricks of the Windows game programming gurus
-Note the Tricks book has very poor code design and teaches bad practices.
It does teach 2d software rendering in some detail throughout DirectDraw, though.

Whatever you choose, good luck. These books are only the basics of game programming.

[Edited by - Crypter on March 10, 2007 11:41:13 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Crypter
DirectX is Microsoft only. It is Object orianted, and a direct to hardware API.
It is powerful, and is a little faster on Windows machines then OpenGL.


The "a little faster" part isn't exactly true, OpenGL and D3D performance are highly dependant on the driver. (as ATI proved by increasing opengl performance by over 50% with a simple driver update after doom3 was released (i guess they didn't enjoy it when benchmarks using doom3 showed that the GF7800 was close to twice as fast as the radeon X1800).

overall the speed of the API:s is irrelevant as it can and does change with every single driver release.

The OO issue is also pointless as it is easy to provide OpenGL with an OO wrapper.

The real issue today imo is that we only have 2 API:s with full hardware support, those are OpenGL and D3D10

D3D10 only runs on Windows Vista, OpenGL runs on Win2k,XP,MacOSX,GNU/Linux,Solaris,and many many others.

D3D9 has better platform support as it is avaliable on Win2k, WinXP, Xbox360 and Windows Vista (and to some extent GNU/Linux), it doesn't support all features on modern graphic cards though.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this