What's the best open source game to learn from?
Open SourceOpen Source Problem Overview
> This question has been preserved for historical reasons, but it is not > considered on-topic, so don't use it as an excuse to post something > similar. > > More info at https://stackoverflow.com/faq.
For me to read code and learn, not to play...
...of course ;-)
Open Source Solutions
Solution 1 - Open Source
Quake (1,2 and 3) and DukeNukem 3D source code is available under the GPL.
Solution 2 - Open Source
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.
Solution 3 - Open Source
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
Solution 4 - Open Source
What about OpenTransportTycoon? :) Come one people - that's got to be the best!
http://www.openttd.org FTW! ;)
Solution 5 - Open Source
How about FreeCiv?
Solution 6 - Open Source
Check out Kenta Cho's games: http://www.asahi-net.or.jp/~cs8k-cyu/index_e.html. Most of them are written in D and use Simple DirectMedia Layer.
They're a lot of fun and the source is extremely readable - a great showcase for the D language.
Torus Trooper screenshot:
Solution 7 - Open Source
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.
Solution 8 - Open Source
Robocode is pretty awesome. See also its entry at Wikipedia.
Solution 9 - Open Source
. . . . . . . . . .
. . . . S . . . . .
. . * . . . . * . .
. . . . . . . . . *
. * . . . * . . . .
. . . . . . . . . .
. . . E . . . . . .
. . . . . * . . . .
. . . . . . . . . .
. . . * . . . . . .
This one... the original Star Trek. PDP11 rulez! :)
Solution 10 - Open Source
Solution 11 - Open Source
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."
Solution 12 - Open Source
I can't believe Hunt the Wumpus hasn't been mentioned.
Or Star Trek?
Solution 13 - Open Source
two words: Frozen Bubble.
Solution 14 - Open Source
My personal favorite is UFO Alien Invasion. I loved the original UFO and this is a really good clone.
Solution 15 - Open Source
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)
Solution 16 - Open Source
No question in my mind, GL Tron. How can you not love it?
Solution 17 - Open Source
Its source code was released in 2004 (I think) and since then it has been improved very much 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. ;)
Solution 18 - Open Source
well....
If you'r into Flight simulators the definitively check out Free Space just can
There are also tons of mods... a very nice one is on the battlestar gallactica universe where you actually fly the viper mark VII
http://www.game-warden.com/bsg/
have fun... errr, of course, where's my head...
happy code reading ;-)
Solution 19 - Open Source
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.
Solution 20 - Open Source
Empire, the Wargame of the Century, naturally. You can download it from classicempire.com. Empire has been flunking out students and wrecking marriages since the 1970's.
Solution 21 - Open Source
Sauerbraten Very nice FPS
Solution 22 - Open Source
Wormux really has a fantastic architechture. i'm a professional game developer and i think that these guys really might be too. the quality of the work smells of years of game dev experience.
Solution 23 - Open Source
Solution 24 - Open Source
I've spent many hours playing FreeCol (a clone of Sid Meier's Colonization).
I mean "studying the source code of FreeCol".
Solution 25 - Open Source
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.
Solution 26 - Open Source
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.
Solution 27 - Open Source
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:
Solution 28 - Open Source
So many games, so little time.
Solution 29 - Open Source
Warsow, obviously.
It's a FPS, technically advanced as Quake 3, open source, with nicely documented code and a great community.
Solution 30 - Open Source
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.
Solution 31 - Open Source
Duke3D released their source code. That's the best game ever. Source code is number 15 under duke3d
Solution 32 - Open Source
A classic: Crowther/Woods Adventure ;-)
Solution 33 - Open Source
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.
Solution 34 - Open Source
No one mentioned freedroidrpg yet.
Solution 35 - Open Source
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:
Solution 36 - Open Source
I've spent more time with Glubulation 2 Than any other open source game. Its an innovative and fresh variation on the RTS genre.
Solution 37 - Open Source
Tremulous is a good multiplayer-game.
Solution 38 - Open Source
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
Solution 39 - Open Source
And I will add a console-game: Meteora Evolution. It is a homebrew-game for the Nintendo DS and Open-Source.
Solution 40 - Open Source
Gnu-Backgammon.
Solution 41 - Open Source
Torcs, the Open Racing Simulator http://torcs.sourceforge.net/
Solution 42 - 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... =)
Solution 43 - Open Source
Open Arena, the best of Quake 3 engine, entirely open-source.
Solution 44 - Open Source
Completely surprised that http://freeciv.wikia.com">FreeCiv</a> 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.
Solution 45 - Open Source
Distributed by Microsoft MechCommander 2 (good mech game).
Solution 46 - Open Source
Solution 47 - Open Source
Do unintentional source releases count? If so, Half-Life 2 and EVE (though it was only the client code)
Solution 48 - Open Source
Global Thermonuclear War (http://en.wikipedia.org/wiki/WOPR) or, tic tac toe
Solution 49 - Open Source
If you're looking for a very quick C#.NET implementation of the classic Balderdash, check out the Digger source here:
Solution 50 - Open Source
It's clearly AssaultCube ;) a fast and fun first-person-shooter that comes as a 40mb package.
Written in messy C++ using SDL, OpenGL and OpenAL :P
Solution 51 - Open Source
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.
Solution 52 - Open Source
GNU Chess is the best. but game play wise people prefer Warsaw first person shooter game.
Solution 53 - Open Source
Ubran terror is a great counter strike like game. http://www.urbanterror.info/news/home/
Solution 54 - Open Source
Megaroids on the Atari ST. Was the demo application for the Megamax C compiler. Played it in Midres (640x200x4colors). Simple game that have this "one more" spirit.
Solution 55 - Open Source
I played a lot myself at Chromium. Back in 2005 it was ship with Mandrake distribution. All my no-I-will-never-use-Linux-but-only-consider-Windows friends where amazed by its quality, beauty and fast pace style.