Jump to content
  • Advertisement
Sign in to follow this  
Weet

C++ Source?

This topic is 4825 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

Hi guys, I've tried searching the forums but haven't come up with quite what I'm looking for. I'm seeking the source code to a well programmed C++ game. I want to look at how the game was structured in regard to OOD. Does anyone have recommendations?

Share this post


Link to post
Share on other sites
Advertisement
Might be worth searching here.

Otherwise it isnt so likely anyone is going to hand out the entire source to a game they have written. There also some C engines in the Articles section.


ace

Share this post


Link to post
Share on other sites
Thanks.

Generally I've found that small insignificant pieces are easy to find. Problem with that is these don't always have the best OOD as it really isn't needed. :(

Ah well, it was worth asking right?

Share this post


Link to post
Share on other sites
Well, I don't know about C++, but the Quake3 source code is some of the better-written and planned C source code I've seen. You should have a look at it if you really want to dive in at the deep end.. See here. Although that won't help you with regards to object-orientation, it will be an interesting read, if you understand it. As for learning OO design, for me, it's worked best to just dive in, discover what goes wrong, read up on better ways to do it, and re-write. Rinse and repeat.

Cheers!

Share this post


Link to post
Share on other sites
Hey,

When it comes to writing object oriented code it isnt necessary to make it OO in the extreme. Now i bet your thinking that engines use all sorts of special OO patterns and such, but im sure they don't. They just use OO as they need to. See the thing is with OO coding is that it isnt a must, it is extremely useful for somethings though. I often write things in straight C because i don't see how OO is suitable for the program i am writing.

Usually it is best to just make objects the entities in your engine but it isnt always good to try and integrate them together in the most complicated ways.

So when it comes to finding code, it often isnt best to find entire projects because the methods of OO it uses might not be suotable for your ideas.

I hope this makes sense,

keep cool,

ace

Share this post


Link to post
Share on other sites
Thanks guys.

I was indeed aware of the Quake3 source and have been looking at it. Very interesting read!

I definitely understand what you mean ace_lovegrove. I'm just curious how some larger projects have dealt with OOP as I'm interested in improving my current OO capabilities. Maybe pick up a few cool techniques or so.

Thanks!

Share this post


Link to post
Share on other sites
Programming is nothing more than talking to your computer. Don't you hate it when someone uses lots of big words to explain something simple? Programming is the same. If your program can be solved just as easily without using a language feature do it. On the other hand if that language feature is the natural way to express what you are trying to tell the computer, then do not forsake it. Just learn your language fully and then talk to your computer in whatever way is most natural and you will have a good program.

Share this post


Link to post
Share on other sites
Quote:
Original post by Weet
Thanks guys.

I was indeed aware of the Quake3 source and have been looking at it. Very interesting read!

I definitely understand what you mean ace_lovegrove. I'm just curious how some larger projects have dealt with OOP as I'm interested in improving my current OO capabilities. Maybe pick up a few cool techniques or so.

Thanks!

If you want a good book with some good OO points and patterns, pick up the Design Patterns book, it's chock full of gooey OO design goodness, although it doesn't specifically relate to game programming or engine design. Just all purpose stuff that you'll find yourself using everywhere [grin] I got it a few weeks ago, and it has opened my eyes, so to speak.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!