Skip to main content

Game programming

Submitted by mongolian on

Well, if some of you have read my one other post, you'd know I have just recently picked up C++. So far, its fairly simple, with a few hard things to remember here and there. But to the point... I havent found any source code for... let's say a game coded in C++. If anyone has source code (want to post some or link me to some), it would be astoundingly appreciated.

Also, do not call me a NOOB or tell me to LEARN IT BY MYSELF. I have tried to put my knowledge of C++ into the process of game producing, but it's so limited nothing happens. If someone has some source code to a small game (no text advents plz), GREATLY appreciated. [:D]

Submitted by palantir on Wed, 23/06/04 - 8:38 AMPermalink

There?s plenty of general information and tutorials around for games programming (check out the links in the coder section), but personally I think that nothing compares to a good textbook. Sure, you?ll have to fork out over $100 dollars, but there are many excellent texts around which pretty much all come with CD?s chock full of code samples and thorough explanations of that code in the text.

Check out [url]http://www.sumea.com.au/forum/topic.asp?TOPIC_ID=1242[/url] for what people around here reckon are good books. I guess it all depends on what level your at for what book is right for you.

Another thing I?d strongly recommend is looking for a well-documented, open source 3D games engine. There?s plenty around, just search around a bit. This thread [url]http://www.sumea.com.au/forum/topic.asp?TOPIC_ID=897[/url] lists a bunch of engines that people here have experience with. But there are plenty out there, you just have to look for them. Personally, I found that studying how game engines work greatly improved my games programming ability.

But personally, I think you just can?t beat a good games programming textbook!

PS ? Don?t worry about being new. Sumea is all about learning and developing after all. Not everyone here is an expert!

Submitted by DaMunkee on Wed, 23/06/04 - 1:15 PMPermalink

For source code, I recommend checking out gamedev.net Other then that, there's plenty of books out there that walk you through making your first game in c++.

Submitted by shiva on Wed, 23/06/04 - 6:39 PMPermalink

for source code, why dont you check out the last sumea programming challenge. everyone's entry was written in 48 hours, so the code might not be the neatest you've ever read, but it works [:)]

Submitted by Daemin on Wed, 23/06/04 - 11:16 PMPermalink

Private message me your email and I'll send you some stuff I've done if you want it... I've done an engine or two, granted the first was while learning to program large systems/engines, but it was a great learning experience.

Submitted by Grover on Sat, 07/08/04 - 10:39 AMPermalink

Hi, I remember trying to learn a language and build something that resembled a game.. back then it was all books and courses - now the internet is a brill resource for code.

As for C++ code, all depends what you are trying to do but looking at complete systems are always an excellent way to learn.
Try some free engines like:
Nebula/Nebula2 - http://nebuladevice.cubik.org/
This is a great well designed and _free_ engine (not GPL). With a huge community and excellent capabilities. Myself and quite a few others I know have used it to make games.

Ogre - http://www.ogre3d.org/
Another excellent source of C++ code - and gaming capabilties. Unlike Nebula Ogre is under LGPL which requires certain obligations if you wish to make a commercial product.

Other places to try for source:
www.flipcode.com
www.gamedev.net (already been suggested I think)
www.gamasutra.com and www.gdmag.com (associated sites)
and there are many more... google is your friend :-)

Also.. for really poor code try my site.. erg.. only if you dare..
users.senet.com.au/~dlannan/
there is just alot of oldish junk here - be warned, not C++ friendly!!

Cheers...

Submitted by arcane on Tue, 10/08/04 - 10:24 AMPermalink

I'd just like to point out that OGRE isn't a game engine, but a rendering engine. Whilst it has been successfully combined with other game related components (physics engines, sound engines etc), it is, in essence, a rendering engine (that is, it covers only the graphics aspect).

Submitted by Daemin on Tue, 10/08/04 - 11:34 AMPermalink

I'm trying to use OGRE now, because otherwise I'd be spending weeks on getting a nice base rendering system done.

Also LGPL licence means that if you modify the engine source code then you have to distribute your modifications. You don't have to do a thing if you just use the engine in a binary form. Although I believe that you also have to include the source code of the engine somewhere. But then again how many other game cd's (used to) contain "fun stuff" like developer images and such?

Posted by mongolian on

Well, if some of you have read my one other post, you'd know I have just recently picked up C++. So far, its fairly simple, with a few hard things to remember here and there. But to the point... I havent found any source code for... let's say a game coded in C++. If anyone has source code (want to post some or link me to some), it would be astoundingly appreciated.

Also, do not call me a NOOB or tell me to LEARN IT BY MYSELF. I have tried to put my knowledge of C++ into the process of game producing, but it's so limited nothing happens. If someone has some source code to a small game (no text advents plz), GREATLY appreciated. [:D]


Submitted by palantir on Wed, 23/06/04 - 8:38 AMPermalink

There?s plenty of general information and tutorials around for games programming (check out the links in the coder section), but personally I think that nothing compares to a good textbook. Sure, you?ll have to fork out over $100 dollars, but there are many excellent texts around which pretty much all come with CD?s chock full of code samples and thorough explanations of that code in the text.

Check out [url]http://www.sumea.com.au/forum/topic.asp?TOPIC_ID=1242[/url] for what people around here reckon are good books. I guess it all depends on what level your at for what book is right for you.

Another thing I?d strongly recommend is looking for a well-documented, open source 3D games engine. There?s plenty around, just search around a bit. This thread [url]http://www.sumea.com.au/forum/topic.asp?TOPIC_ID=897[/url] lists a bunch of engines that people here have experience with. But there are plenty out there, you just have to look for them. Personally, I found that studying how game engines work greatly improved my games programming ability.

But personally, I think you just can?t beat a good games programming textbook!

PS ? Don?t worry about being new. Sumea is all about learning and developing after all. Not everyone here is an expert!

Submitted by DaMunkee on Wed, 23/06/04 - 1:15 PMPermalink

For source code, I recommend checking out gamedev.net Other then that, there's plenty of books out there that walk you through making your first game in c++.

Submitted by shiva on Wed, 23/06/04 - 6:39 PMPermalink

for source code, why dont you check out the last sumea programming challenge. everyone's entry was written in 48 hours, so the code might not be the neatest you've ever read, but it works [:)]

Submitted by Daemin on Wed, 23/06/04 - 11:16 PMPermalink

Private message me your email and I'll send you some stuff I've done if you want it... I've done an engine or two, granted the first was while learning to program large systems/engines, but it was a great learning experience.

Submitted by Grover on Sat, 07/08/04 - 10:39 AMPermalink

Hi, I remember trying to learn a language and build something that resembled a game.. back then it was all books and courses - now the internet is a brill resource for code.

As for C++ code, all depends what you are trying to do but looking at complete systems are always an excellent way to learn.
Try some free engines like:
Nebula/Nebula2 - http://nebuladevice.cubik.org/
This is a great well designed and _free_ engine (not GPL). With a huge community and excellent capabilities. Myself and quite a few others I know have used it to make games.

Ogre - http://www.ogre3d.org/
Another excellent source of C++ code - and gaming capabilties. Unlike Nebula Ogre is under LGPL which requires certain obligations if you wish to make a commercial product.

Other places to try for source:
www.flipcode.com
www.gamedev.net (already been suggested I think)
www.gamasutra.com and www.gdmag.com (associated sites)
and there are many more... google is your friend :-)

Also.. for really poor code try my site.. erg.. only if you dare..
users.senet.com.au/~dlannan/
there is just alot of oldish junk here - be warned, not C++ friendly!!

Cheers...

Submitted by arcane on Tue, 10/08/04 - 10:24 AMPermalink

I'd just like to point out that OGRE isn't a game engine, but a rendering engine. Whilst it has been successfully combined with other game related components (physics engines, sound engines etc), it is, in essence, a rendering engine (that is, it covers only the graphics aspect).

Submitted by Daemin on Tue, 10/08/04 - 11:34 AMPermalink

I'm trying to use OGRE now, because otherwise I'd be spending weeks on getting a nice base rendering system done.

Also LGPL licence means that if you modify the engine source code then you have to distribute your modifications. You don't have to do a thing if you just use the engine in a binary form. Although I believe that you also have to include the source code of the engine somewhere. But then again how many other game cd's (used to) contain "fun stuff" like developer images and such?