views:

313

answers:

9
+3  Q: 

Game programming

I would like to learn game programming. Just to give you a background I am a programmer and understand the concepts of programming and am very object oriented. I have worked with languages such as php, javascript, flash, java, and a little c++. Now from my understanding most of game programming is done in either python or c++. Now I have a few questions as to where to get started in actual game development because I know that it is a broad question.

  1. I would like to be able to program games cross platform so should I be using opengl instead of directx or is there another alternative? Are there any downfalls to using opengl instead of directx (or other applicables).

  2. I would also like to know how to do the graphics for these games as well. I have seen applications out there such as Maya and 3ds max. Should I be using one of these applications or is there other alternatives. Also which one would be better suited for crossplatform and has an easier learning curve for beginners.

  3. Is there a good site to go for development of these games? I would like to do 3d development, I know most say start with 2d but I like to do what I want to do :). I have been to gamedev.net but there site can be a little confusing to navigate sometimes.

  4. Any good books out there that anyone can recommend or any other resources would be great. I would love to have a good place to get started to play around with 3d games before I get into more advanced development.

Thanks for any replies.

A: 

Whilst this is related to programming, it might be better suited to posting on http://gamedev.stackexchange.com/ although I would be surprised if there was not many similar questions there already.

ninesided
This really should be a comment (in fact, it already is), not an answer.
FrustratedWithFormsDesigner
ditto, this is unnecessary.
Rafe Kettler
When the question belongs somewhere else in the first place, what answer could possibly be necessary?
mizipzor
+1. Question 4 asked about other resources. This is a link to another resource. I think this is helpful
nikie
+4  A: 

OK! Four questions :)

1) OpenGL and DirectX are both good. OpenGL is properly cross-platform, and works on phones. DirectX offers some advanced features, but you can get a job doing either.

2) Maya and 3ds are both 3D tools. You can use them, but you can also go a long way with 2D stuff, especially with phone games.

3) The very first place to look is here. Quick intro, shows you animation of 2D shapes. Gives you all the very basics, which will apply whether you do 2d or 3d development. Obviously starting with 3d is tough, because you need to know a lot more trig.

4) A free 3D game engine to try out is the Quake engine (here), that's simple enough to get to grips with, but also encompasses many advanced features.

Robert Grant
For #3, I'd recommend NeHe's OpenGL tutorials: http://nehe.gamedev.net/ (since he really wants to start on 3D - good luck! :) )
FrustratedWithFormsDesigner
3) Your link is broken. And he's a C++ dev, not a Java dev. 4) He's having trouble following what's on gamedev.net, yet you suggest he works with the raw Quake engine.
Nick Wiggill
The link works fine for me. "I have worked with languages such as php, javascript, flash, java, and a little c++." I took that to mean he does know some Java. And he's also asking about going straight to 3D gaming; the "raw" Quake engine isn't a terrible start. I assume you downvoted me for these "mistakes"; I won't do your answer you the same discourtesy, as downvoting competing answers is pretty suspect.
Robert Grant
The link is indeed not broken, that was my system playing up. Apologies on that one. Yes, I downvoted on the Quake Engine thing, purely. By giving answers that don't help people, you are not saving them time, but costing them more of it. Feel free to pick mine apart if you wish.
Nick Wiggill
This is a question about starting 3D game programming. Just because you think the person asking the question isn't ready for the Quake engine (yet), it doesn't mean that a) he will never be ready and b) that other people wanting to know the answer to the same question might not benefit from it. I've tried to provide an answer that matches his skills (hence the Java link) but also will be of general interest to people wanting to know the answer to his question. Plenty of people started game programming by modding the Quake engine.
Robert Grant
On second thoughts, re the Quake Engine -- I agree. He did say he was interested in 3D. Point replaced (tried to anyway, said it's locked till the answer is edited).
Nick Wiggill
Hehe no worries about the point, cheers :)
Robert Grant
+3  A: 

For question number 2. Those are great programs for 3d modeling but very expensive. Blender is a good free alternative.

schwiz
+1 for blender!
FrustratedWithFormsDesigner
A: 

Dark GDK is also a good start.

Joset
+1  A: 

If you're making 3D games, C++ is the way to go. C++ will run faster, and will probably be most familiar to you in your object-oriented and Java experience. Almost all modern PC games are written in C++ (think Half-Life 2, BioShock, etc.).

DirectX is good if you want to program for Windows or Xbox, but since you said you'd like to be able to program cross platform, OpenGL is the way to go. It's less supported by video cards, but it'll work on PC, Linux, Mac, as well as phones etc.

As for 3D tools, I concur with schwiz. Before you invest several thousand dollars in a program like Maya or 3DS max, check out Blender. It's also surprisingly powerful.

I think a great place for you to start on games is to modify an existing game, that way you can get an understanding of how game engines work, and also get some 3D modeling and such under your belt. I can't think of a better game engine to modify other than Valve's Source Engine (HL2, TF2, Portal, and Left 4 Dead all work on it, and I think the SDK is available for free, though even if it wasn't you'd just have to buy Half-Life 2). Also, Source has a very active modding community that could help,

Rafe Kettler
A: 

Consider which platform you want to target before getting started. C++ is pretty universal, but C++ console development (esp. for the PS3 and Xbox) requires a dev kit. The Sony kit is easy to obtain but not cheap. The Microsoft kit is REALLY not cheap, and they won't sell it to you unless you have an established presence in the game industry. (read: at least one published title). This is something of a chicken-egg problem, but such is life. The point seems to be to prevent the inevitable deluge of requests from fanboys that can't tell the difference between a matrix and a tensor.

If you're specifically interested in Windows/Xbox/WinPhone7 development, consider Microsoft's XNA. It's effectively a managed wrapper around DirectX. It officially requires that you develop in C#, but it's possible to include managed C++ in your project, allowing for a more platform-agnostic code base that you could potentially reuse for other environments.

If you plan on targeting desktops and want to keep things compatible with Linux and Windows, OpenGL is the way to go since it's supported in both environments.

David Lively
xna great for learning
schwiz
+1  A: 

Also check out the GameDev wiki.

mizipzor
+1  A: 

Maya and 3ds Max are both expensive 3D modelling tools from Autodesk. If you're looking for a free alternative to help you get started, you can try Blender, which is cross platform.

A free 3d graphics engine I use often is Ogre3d. It's native language is c/c++, but has wrappers for other languages available. Being a graphics engine, Ogre3D doesn't handle anything else you will need for a game, such as sound, networking, physics (collision) or ai. Information on 3rd party libraries to handle most of this (that work well with Ogre3D) can be found in their forums.

Rookz
+3  A: 

1) OpenGL, if you want cross platform. It also ties in with other cross platform languages such as Java, if you should ever choose to step away from C++ for a given project.

EDIT: I'll also mention that often, for new designer/developers, you will think cross-platform is the holy grail. It is not. Your most important goal is to get the game to SELL, period, on a platform (as determined in your market research). And if it does sell, don't worry, you will have (or be able to find) the time and financial support to port it. Don't get burned on your very first project due to inconsequential concerns. If you remaind keen on cross platform, consider C# .NET/Mono/Unity as possible options.

2) WARNING: Do not be blithe about producing assets for games, yourself. I have always been a pretty artistic person, but I'm a game designer and developer first and foremost. It IS NOT easy producing assets of any reasonable level of quality, totally aside from all the technical concerns involved. I have heard from other very talented indie developers (coding and art-wise) who've failed to deliver on projects because they spent way too much time on artwork. They had to learn tools AND technique. It is a whole other profession, do not underestimate it. I strongly suggest you maintain your focus on development and find a partner for the art/assets side. If you want to do concepting yourself, that is fine.

3) Gamedev.net has been running for many, many years and is probably your best resource. I would stick with it until you start understanding things -- game programming is HARD and Rome wasn't built in a day. There are various others out there like forums.indiegamer.com, if you're an indie (or even if you're not). EDIT: GPWiki is another great resource.

4) There are thousands of good books. It very often depends on your language. The "Black Art" books for game programming are great, as are all the "Game Programming Gems" (AI Gems, GPU Gems, you name it).

Nick Wiggill
Your point #2 is very good here.
FrustratedWithFormsDesigner