Sign in to follow this  
Ergawy

Open source code that can be a good read

Recommended Posts

Ergawy    184

I recently read many articles that justify how reading others code is so beneficial. I guess this is a very good skill (reading others code) that I wish to strengthen. So do you guys have any pointers to open source projects that I can read for learning. I have no restrictions on what kind of code I read as long as it is beautifully written code by masters who know what they are doing smile.png. So games, game engines, tools, or any other piece of software that I can read and study in my spare time.

Share this post


Link to post
Share on other sites
lephyrius    355

I really love the NGINX source code. It's documented very well but it's a bit too large to start with and not game related. 

So that's my suggestion.

Share this post


Link to post
Share on other sites
georger.araujo    1282

I recently read many articles that justify how reading others code is so beneficial. I guess this is a very good skill (reading others code) that I wish to strengthen. So do you guys have any pointers to open source projects that I can read for learning. I have no restrictions on what kind of code I read as long as it is beautifully written code by masters who know what they are doing smile.png. So games, game engines, tools, or any other piece of software that I can read and study in my spare time.

The source for the SFML Game Development book. I'm reading the book now and I really like the code.

A word of caution: the book is NOT for absolute beginners. The authors assume intermediate C++, and use quite a bit of C++11 on top of that.

Share this post


Link to post
Share on other sites
RyanLunger    118
Reading code will only benefit you if you fully understand the language. +1 for ogre. But it fully depends on what you need to learn. Look for patterns within the codebase. Developers adopt very different paradigms within even the same language. Try to understand the design decisions (implications) behind the architecture.

Share this post


Link to post
Share on other sites
Hodgman    51328

Nice list from xenobrain biggrin.png

 

I learned a huge part of my initial C++ and game programming skills from reading the original Half Life source code. I actually modded it for over 5 years until I'd read and understood almost the entire code base (they gave out all the server and client game code, just not the engine code and some of the tool code) -- it was a great practical tutor for gameplay, AI, player movement, animation, effects, networking, HUDs, etc... It's pretty outdated now, probably not even standards-compliant C++ seeing it was made with MSVC6... The modern replacement would be the Source SDK.

There's also all the ID software games, with the old quake/doom games all being open sourced.

 

I dump some of my own engine code here: https://code.google.com/p/eight/source/browse/

...but it's not documented, barely commented, doesn't contain published examples, and uses a lot of low-level C++ tricks, so it's not very beginner friendly. Might be interesting as a kind of puzzle though tongue.png

Edited by Hodgman

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this