views:

3695

answers:

25

My nephew is an aspiring game developer. I have taught him a bit of C/C++, and suggested he learn that for a start.

Once he has come to grips with that, which game/graphics API's do people suggest he learn?

I would think DirectX would be current industry standard, but with more games looking to go X-platform then maybe Open-GL would be a good starting point?

I have briefly looked at XNA, maybe that would be a nice easy step to take before jumping to a more complex framework?

A: 

I certainly think the easiest to learn would be XNA - its the most high level of the three you mention.

samjudson
+1  A: 

I'd say go for XNA. The most important part of gaming development is the more advanced topics, like collision detection, ragdoll effects, you name it. The platform itself doesn't matter much, as you'll probably work with an existing engine anyway.

Another good point about XNA is that you can eventually publish your games to the Microsoft Arcade, or so I've been told. If you have a cool game, it's a great way to get some publicity (and hopefully be noticed by one of the big game studios ;-))

Isn't XNA an abstraction of DirectX anyway?

Erik van Brakel
+26  A: 

With XNA supported on both Windows and the Xbox, and a mobile version demonstrated for the Zune (however small that install base is), I would say that it's a great place to start learning game development. I hear that several universities in the US are already teaching it as part of game development courses.

And of course it's a great stepping stone to .NET development if your nephew one day intends to move into the world of business software development.

Matt Hamilton
XNA is definately rising in popularity within universities. My uni has just invested in a new PC suite kitted out with 30 XBoxes specifically for XNA development. Shame I've just left :(
Ross Anderson
And of course, XNA is supported on Windows Phone 7 now! You can create mobile games (and other types of applications, if you prefer it over Silverlight) too!
Matt Hamilton
+5  A: 

XNA is great for learning games dev, but remember that it's C# not C++.

One resource I would recommend is 3DBuzz.com, as they have some free C# video tutorials and sell the XNA Xtreme 101 series, volume 3 to be released in the new few days.

They also sell C++/OpenGL videos as well, from personal experience it is great content, and a good introduction into C++ and then OpenGL.

Cheers

thing2k

thing2k
+36  A: 

DirectX and OpenGL are just hardware abstraction APIs, OpenGL focusing on graphics whereas DirectX includes audio, networking and input. Knowing these APIs does not make you a game programmer, there is far more to games than just drawing graphics.

Games are generally CPU limited, that is, the CPU is at 100% all the time, so it is important to understand how various elements of programming affect CPU use. I'm not talking about machine code optimisation, rather, understanding how algorithms perform: std::list versus std::vector; A* versus Dijkstra and so on and knowing when and how to apply them. Then there's multi-cpu programming, understanding how to use shared resources, semaphores, mutexes, etc.

As well as CPU limits, games often have other limits: memory, IO speed (I'm looking at you Broken Sword 3 on XBox, I curse your loading times), ROM size (disk or hardware), so the term 'optimisation' is not always about speed, but can include data size or access times.

In addition to the game code, there is usually a suite of tools required to generate the game data - converters to transform graphic data into an engine compatible format, editors to build game levels, tools to edit AI behaviour. Understanding good GUI design can make the difference between a good tool and a poor tool and good tools will allow artists and designers the freedom to create better games either through ease of use or by allowing rapid iteration of ideas.

To sum up, don't focus on the graphics too much, work on the other stuff too. Of course, the problem with graphics is that you're unlikely to produce anything that looks like most commercials titles, they have teams of artists and designers who have spent years training to do their job or use expensive motion capture studios to generate the required data and failing to recreate these may eventually put you off game programming which would be a shame.

Some project ideas:

  • Text adventure system using simple verb/noun (something like The Quill on the ZXSpectrum) - requires data driven design and parsing
  • Scrabble - searching algorithms, simple GUI
  • Tetris - real time gaming, audio, simple graphics (can add 3D elements)
  • Effect editor - create a tool to view effects on 3D models, like texture blending, lighting, etc
  • Physics demo - 3D boxes and spheres bouncing around in a room
  • Multi cpu demo - errr, can't think of anything but I'm sure there's people here who will be happy to suggest ideas

Also, having a range of game and game related programs demonstrating various skills in your repetoire will help enormously when going to job interviews, provided they are complete of course.

And most importantly, learn about source control!

Skizz

Skizz
The Quill - wow, that brings back memories. Me and my mate were just starting out doing this and managed to lose the instruction manual on the way between our two houses. In those days it wasn't so easy to get replacement manuals and that could be the reason I'm working here instead of on my yacht!
Carl
A: 

I believe XNA is one of the best places to start for these reasons.

  • It targets popular platforms (Windows, XBox 360)
  • They have great examples to download. You can run them and you have full access to the source code.
  • It has a growing online community
  • There is probably a user group available to go to.
bruceatk
It should be noted that they charge a fee to dev on the Xbox 360)
Slapout
But is microsoft-centric.
alvatar
@Alvaro, so what, it's still probably the best place to start. It will help you get started and actually see results. If after that you want to move to a more difficult tool set that lets you develop for more platform, you can.
bruceatk
+9  A: 
Prakash
+10  A: 

I wonder if Stack Overflow will be so .net centric after the beta ends and the dirty hoards are allowed free reign :)

I think cross-platform is always a better option but I wouldn't go for a 3d environment at first but would use SDL or pygame to get hacking on some prototypes first. If your nephew is really going to be getting into game creating it's far easier to learn the basics of making a game fun in 2d and cloning simple games than in a full blown 3d setup.

@Skizz; do you use any other handles because the "I'll get my coat" and mention of The Quill on the speccy certainly suggest our paths should have crossed at some point ;)

sparkes
Ouch, I feel insulted through time! I am not part of some dirty hoard!
Callum Rogers
+4  A: 

I would give PyGame a shot. It is in Python, so a little higher level than C++. It won't give you the speed of C++, but for simple games, it is nice.

varikin
A: 

@sparkes: (There's no PM facility that I can see anywhere) Yes, Skizz is a name I've used a lot but your handle and piccy don't trigger any decaying synapses. If you've worked at SCi, Climax, Criterion, Ninja Theory, Kuju Guildford or Tower Studios then we've probably crossed paths.

Anyway, I'm off on holiday for a week - no crack overflow, I'm not going to survive,

Skizz

Skizz
+1  A: 

A word of caution about the future of OpenGL, this was posted a couple of weeks ago on Blue's News:

OpenGL 3.0 Specs Released, Unhappiness Ensues [August 12, 2008, 11:28 am ET] - Khronos Releases OpenGL 3.0 Specifications has the specs for the next iteration of the OpenGL API. According to the post about this on Slashdot (thanks Mike Martinez), this has spurred negative reactions from developers who had been promised major changes which have not materialized. They point the way to discontented forum threads like this one and this one and to a summary on GameDev.Net that says that developers were promised version 3.0 but the spec seems more like version 2.2, recalling a comment by John Carmack from QuakeCon 2008 that suggests the new spec has been built to maintain compatibility with existing CAD applications. This all has spurred widespread speculation that this ends what is left of the API war, with the comment on GameDev.Net saying: "I'd like to congratulate MS for winning the 3D API 'war' on Windows, turns out they didn't need to sink the goodship OpenGL, the captains ran it into an iceberg for them."

17 of 26
+6  A: 

PyGame seems to be the easiest option for folks who are beginners to both game programming and programming itself. But, it requires knowledge of Python, which isn't really a problem since it's easy to learn.

Allegro is a popular and stable game programming library for games that aren't heavy on 3D. (Check out the games built using Allegro at Allegro.cc, they're pretty cool!) Built around OpenGL, Allegro provides a C/C++ programming interface and it's multi-platform, another plus.

XNA is tied to .Net and provides a C# interface.

All these 3 options are several magnitudes easier than programming in DirectX or OpenGL, both of which are very low-level programming interfaces. You don't want to start with these two if you're interested in just games programming.

Ashwin
A: 

That depends on what are you trying to teach. If generic programming then maybe Pygame is best, as Python is a simple enough language. If beginning game programming, then Allegro is your choice. If you want to teach 3D programming I'd recommend OpenGL and C++.

Kronikarz
A: 

Depending on how old is your nephew and what does he like, it might also be a good just to start with modding - purchase a game like The Elder Scrolls IV: Oblivion, download the Construction Kit and get to creating maps/worlds/stories/mods. Quite a few existing game studios (or skilled individuals) have started their career as mod or map pack developers.

Being a game developer doesn't necessarily mean programming - content creators ("dungeon keepers") play equally (if not bigger) role than programmers. After all, difficulty imbalance, immature dialogue, confusing interface and terrible story can all make the difference between a bestseller and an average or terrible game, absolutely independently on the quality of the code and graphics. (However, good engine can still make you millions even with a boring game - just look at Crysis. ;)

analytik
+3  A: 

pyglet is an alternative to pygame.

Tomi Kyöstilä
It should be noted that Pyglet sits on top of OpenGL while Pygame sits on top of SDL.
James McMahon
+6  A: 
Nathan
A: 

XNA, for sure. There's nothing more inspiring than stepping through code that's running on your retail 360 :)

moobaa
+1  A: 

I would agree with the XNA suggestions but You could try
SDL

It is well documented and is cross platform and there are .net wrappers for it as well

Dan Adams
A: 

It depends on what kind of student (i.e., how persistent) your nephew is. I'd encourage you to offer him a different view on things by giving him Flash Studio, so he can mess around with prototypes a lot faster than what he'll get from XNA. (If money is a concern, Flash compilers are now free of charge, Flash Studio is the only one that requires payment. But they're not as friendly, anyway.)

ActionScript in its most recent incarnation is a lot closer to "good" Object Orientation and he'll be able to have a broader view of what different computer languages have to offer. Also, he'll be able to focus a lot more on getting a game to be fun than on learning specifics of APIs and shader programming. Plus, he'll be able to show his work to his friends and grandma without anyone having to download or install messy frameworks.

After he's had enough of playing with that, then it's time to break out the XNA.

Pedro
+1  A: 

Probably the fastest to get results with would be the OpenGL - drawing triangles, moving to textured particles and such is really simple and the learning curve is not too steep.

However, when you want to start dealing with models, loading and manipulating, DirectX offers you a much better interface and complete libraries to create more elaborate stuff without putting too much work developing the pipeline yourself.

XNA - great development environment which is also easy to use. One of the only frustrating thing about it is that it is indeed in C# and not in C++. Nevertheless, once you learn the basics of C# (rather simple although you have to remember that memory management there is not under your control), adding sound, graphics, input and many other features are very easy and well documented with many examples.

So... your choice depending on where you want to take it. I'd probably choose the XNA for your case since it does provide a full comprehensive development environment for casual games.

Adi
A: 

XNA is great.... if you only want to develop in windows ever, which is a huge con in my book. OpenGL will run on every computing platform, excluding xbox...

duane
A: 

@duane - XNA is capable of Windows, Xbox 360, and soon to be Zune. XNA is part of .NET so technically it could be extended to any platform in the future. As far as your suggestion of OpenGL... That won't run on any current generation gaming console. All gaming consoles have their own flavor graphics API based off either OpenGL or DirectX, but not exactly OpenGL.

Balk
Well, Windows and Xbox 360 is nice, but that's only two platforms. With OpenGL, you can run on Linux, Macs, Windows, and (to a certain extent) the PS3 and the Wii (the latter with a wrapper). That's five platforms. And, in regard to the zune, nobody uses it. At all. With opengl, you have the iPhone.
duane
+8  A: 

C/C++ are tools for professionals; there's almost no reason for an aspiring game developer to start there. It's like suggesting a heavy duty dangerous wood cutting machine to an aspiring wood carver - not only it's too big and too complex to a beginner; it can also kill him!

For a beginner game developer, I'd suggest starting from something that lets him concentrate on the game, and not the low level details. There's a ton of tools for that (I'm lumping them all under one list, even if they are quite different): Flash, Unity, Game Maker, Blitz Basic, Torque Game Builder, XNA, PyGame etc. (XNA and PyGame are probably lowest-level from this list). Let someone who makes those tools worry about all the dirty details; a beginner should be focused on making the game.

When and if (and that's a big if in fact) he bumps into limitations of above tools, he can start looking at heavier machinery. Be it lower level engines/libraries (like Ogre), or plain C/C++ with native interfaces (Direct3D/OpenGL for graphics, other libraries for sound, other libraries for input, ...), does not matter. By then he'll know which limitations he's running into and will be able to choose the technology.

The argument of "oh, but all big games are written in C++ with Direct3D!" does not apply here. Big games are written by hundred-person teams made of professionals, with multimillion dollar budgets. Your nephew is not quite there yet... And not all games are those "big" games either; lots of small (and very successful!) games are written in Flash, for example.

That said, from your list of D3D, OpenGL or XNA I'd suggest XNA, just because it's somewhat higher level than the other two. But it would be better to start from even higher level than XNA.

NeARAZ
+1  A: 

A relatively new and interesting entrant in the game-development arena is ShiVa. Until Unity3D for PC becomes available (not holding my breath) this, so far, seems worth digging deeper into.

Scott Evernden
+1  A: 

Go for Open Source!

ZeroCool