I did a little game development back in the day. Nearly every programmer, at one point or another, has at least thought of producing the next hot game to hit the shelves. The way I started was to work with MUDs (Multi-User Dimensions) by editing the source code of premade game frameworks (code bases). All of the code bases I picked through had a special license called the DIKU license; the reason is that DIKUMUD was the first of this huge family tree of code bases. You could edit and distribute the code all you want, but you couldn't profit off of it commercially, and every time someone added even the most basic set of snippets onto the code, they would make a whole new code base and a special license that goes with the DIKU license. So, by the time you get to a third or fourth generation code base, you've got a novella of licenses to read through before you can even mess with it.
Then I discovered the GNU Public License. GPL is an extremely common license to run across these days, so it's worth a quick read so you know what's up. There's some really nice pluses to using GPL code in your project as well: the license is uniform, the code is free, and you can use it commercially! A common misconception is that GPL licensed software can't possibly be commercial because it's open source, so people will not pay you for the game. Yes, the code will be open for people to see and modify if it's GPL, but you can still turn a very nice buck. First off, the graphics, sound, and everything else that you've created which isn't code will be your property, and you don't have to distribute it. Second, if it's an MMOG (Massive Multiplayer Online Game), you can charge a monthly fee, sell schwag, and all sorts of other options.
One of the engines to come out under the GPL license is the Crystal Space engine, and you can find some very nice screen shots and demos on the website that show the engine off. There have been commercial games, online games, and your general open source free-as-in-beer games to be developed with Crystal Space. There's plenty of other engines out there as well including: Axiom, Daimonin, Delta3D, Entropia Engine and the list goes on and on. The downside is that you won't be able to effectively produce an offline shelf-game and charge an insane rate for it like most game publishers do--people can just download the source code, compile it, and pirate the graphics. However, even if you had proprietary code, they would just go ahead and pirate the binaries anyway, so you'd be up the creek. At least with GPL, you earn cool points for releasing your code for the common good instead of getting ripped off by pirates.