For me to read code and learn, not to play...
...of course ;-)
For me to read code and learn, not to play...
...of course ;-)
That said, you can devote some time reading http://en.wikipedia.org/wiki/List_of_open_source_games
It also depends what exactly do you want to learn... For instance there is an annual competition for games written in Pygame
Do unintentional source releases count? If so, Half-Life 2 and EVE (though it was only the client code)
Quake (1,2 and 3) and DukeNukem 3D source code is available under the GPL.
If part of the reason for open-source code is for code to be reused and recycled as it evolves, then I think influence and legacy would be two large factors in this decision. On this basis, I would probably vote Rogue / Hack / Nethack. It was one of the seminal influences behind the hack-and-slash dungeon-crawling genre, living on today in thriving communities that still play these old ASCII games, as well as having a significant influence on some of the most popular graphical games of all time, such as Diablo and Diablo 2.
If your intent is to see how a game works and are willing to spend a small amount of money to see it, I highly recommend the Torque Gaming Engine from GarageGames. For $150 you get the entire engine source code of a AAA game title (Tribes 2). The content was ripped so you aren't buying Tribes 2, but content is easy to replace. Compared to the cost of other comparable engines, Torque is an amazing bargain. And if you ever decide to produce a game, you can do so without overbearing licensing restrictions.
EDIT: I know its not Open Source, but for your purpose of learning code it should qualify. The engine is coded in C++ and there is a script layer that is similar in syntax to C#/Java.
I can't believe Hunt the Wumpus hasn't been mentioned.
Or Star Trek?
What? No one here likes Tux Racer?
I just LOVE that game!!! It's fast paced and can run on almost any decent modern computer (no need for expensive video cards). And it runs on Windows, too!! Furthermore, it demonstrates that "penguins can fly" (and even surpass speed of sound :P)
Dopewars is fun to play on the internet or on a LAN with friends. And it runs on Windows, OSX, Linux, iPhone and there is an adaptation on Facebook.
Warsow, obviously.
It's a FPS, technically advanced as Quake 3, open source, with nicely documented code and a great community.
I'd have to go with GNU Chess.
If you're really interested in looking at the code. From the wiki: "Version 5 was essentially a complete rewrite from scratch of GNU Chess to eliminate spaghetti code and replace antiquated data structures with more advanced computer chess implementation techniques."
I can't believe, nobody mentioned Armagetron Advanced yet!
For fans of the movie Tron, this is a nice way to waste some time online with other players worldwide.
Duke3D released their source code. That's the best game ever. Source code is number 15 under duke3d
There is a very good text based role playing game called 'make', you are on a quest to find hidden dependancies guarded by bearded sages and wrestle patches from them.
. . . . . . . . . .
. . . . S . . . . .
. . * . . . . * . .
. . . . . . . . . *
. * . . . * . . . .
. . . . . . . . . .
. . . E . . . . . .
. . . . . * . . . .
. . . . . . . . . .
. . . * . . . . . .
This one... the original Star Trek. PDP11 rulez! :)
Depending on what platform you're going for, the XNA guys have a few "starter kits" of ready to build projects, the code is available, but it's not explicitly open source:
What about OpenTransportTycoon? :) Come one people - that's got to be the best!
http://www.openttd.org FTW! ;)
No shout outs to Angband yet? It went under new "ownership" in March of this year and is still the most addictive fantasty/dungeon style game I've seen. Source is readily available and it is pretty slick to see how a program can still be heavily active after its initial release back in 1993, or even later, if memory serves on its lifetime.
My personal favorite is UFO Alien Invasion. I loved the original UFO and this is a really good clone.
Global Thermonuclear War (http://en.wikipedia.org/wiki/WOPR) or, tic tac toe
And I will add a console-game: Meteora Evolution. It is a homebrew-game for the Nintendo DS and Open-Source.
I don't think it counts as "open-source", but I loved QBasic Gorilla.Bas grin I used to edit it to make all buildings disappear when the banana hits the sun; then it's a Banana Free-For-All! xD
I also took the liberty to rename the game QBrian Gorilla to make fun of a friend of mine... Lame, I know, but hey, I was 14. Haha..
QBasic was the first programming language I got into, before later moving on to VB, and then ASP, PHP and VB.Net. Ah, nostalgia... =)
If you're looking for a very quick C#.NET implementation of the classic Balderdash, check out the Digger source here:
Freespace 2 source code. It is based off of the original Volition Freespace 2 (released as open source). This is production (and thus "battle tested") code and will give you a good look at how shipping titles look (with all of the warts).
You can gain access to the FS2_open source through SVN here:
I've spent more time with Glubulation 2 Than any other open source game. Its an innovative and fresh variation on the RTS genre.
Its source code was released in 2004 (I think) and since then it has been improved very much (almost rewritten) by the mod community. The mod goes under the name JA2 v1.13 and the community resides at Bear's Pit.
P.S. For reading and learning from the code, this might not be the best project. It's old C code with many functions spanning hundreds of lines. Unless you want to learn how to work with legacy code, playing it is more fun. ;)
Hedgewars it's fun, runs smoothly, has nice graphics and everyone who liked Worms World Party will enjoy it.
To compile and install you need:
Qt >= 4.4
FreePascal >= 2.2.0
SDL >= 1.2.5
SDL_net >= 1.2.5
SDL_mixer >= 1.2
SDL_image >= 1.2
SDL_ttf >= 2.0
CMake >= 2.6.0
Completely surprised that FreeCiv didn't get a mention yet. It is truly the best online multiplayer game out there. And I have played it for hours.
As for compiling, you can pick between the SDL client and the GTK client.
dude. I can't believe nobody has voted for Wesnoth!
Edit: can't believe I missed that. doh.
The MMORPG Ryzom was open sourced a few days ago (blog post).
While I'm not that well versed in game programming, paroneayea's comment on reddit makes me think it's worth a look:
It's hard to understate how big of a release this is. The volume of assets here, the size of the codebase.. The fact that anyone can run their own MMORPG server, or contribute back useful assets to make it into the main server!
Honestly I don't think I've been this excited about the freeing of a project since Blender was released as free and open source software nearly a decade ago.
Quite recently a few of the games from the Humble Indie Bundle went open source and are probably pretty interesting for people to look into. Gish, Lugaru, and Penumbra were all opened.