• Advertisement
Sign in to follow this  

Open source code for a beginner

This topic is 2138 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a firm understanding of C++ beyond the beginner stuff; I know classes, polymorphism, templates, ect... What I am looking for is some example source code that is properly written to look at. Something small and simple like Tetris or Snake, not huge like the Doom 3 source code.

I found this on LazyFoo's website. http://lazyfoo.net/g...locks/index.php and it's working code, but there are a lot of global variables, C style functions that should be part of a class object, and so forth. I'm not bashing his code, Ive written far worse myself.

I don't need perfect, I just need something with a good format as a reference. Something I can use whenever I hit a roadblock to look and see "how they did it".

Anyone know of or have any open source game code I can look at? Edited by Kaanin25

Share this post


Link to post
Share on other sites
Advertisement
This seems to be exactly what you are looking for. Also, keep in mind, it is ONE way to do things, and it favors readability over performance, but it goes beyond the level of polish of most demos/tutorials.

Share this post


Link to post
Share on other sites

You want to know the best way to learn design? Stop going around to other people's projects hoping you'll find some magical piece of wisdom and go out and get your hands dirty.



I agree and disagree with this. The best way to learn just about anything is by doing it, jumping in and getting your hands dirty.

That said, you can learn an absolute ton about design from other people. Past mentors, reading other peoples code, books. There have been some books that had a profound effect on my code, Effective C++, Code Complete, JavaScript:The Good Parts, Refactoring, Design Patterns to name but a few.

You jump right in to learn how to make shitty code; you read books, blog posts and talk to other developers to learn how to make it better.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement