Thread: Beginning Game Programming Type Books

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    545

    Beginning Game Programming Type Books

    What are the best books for teaching game programming, I know some C++ and am probably up to about the level of Classes and Inheritance. I will obviously have to go further into C++ to get into Game Programming but I was wondering what books there are that are easy to understand and C++ oriented when using graphics type stuff. As most of them seem to be for C.

    HMMMM, I don't know if my questions are too vague for you or not but any answers would be greatly appreciated.

  2. #2
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  3. #3
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Would it be easier to start off with 2D programming?

  4. #4
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    I always recommend this book for beginners: Tricks of the Windows Game Programming Gurus by Andre' Lamothe. It will teach you 2d game programming coming from someone with 22+ years of experience. It also covers input, sound, AI, physics, etc. You can find it here with several reviews:

    http://blog.markwshead.com/info2/Tri...-Edition).html

    Once you're done, he has a second volume on 3d software rasterization. Software?! Yes, he believes if you're going to be a graphics programmer, you need to know how it works underneath. Who builds the graphics cards, etc.? But once you finish this book, going to any hardware accelerated graphics API (OpenGL, Direct3D) can be learned in a matter of two weeks. He is planning a third volume to cover hardware acceleration with a DOOM-like engine. Anyway, I believe it is a good educational series starting from the ground up. It's a little pricey, but it's the best book series ever in my opinion. If you can't complete this book, it's a good thing actually because you're glad you didn't try adding a third deminsion in the first place and ended up wasting your time.
    Last edited by dxfoo; 09-03-2006 at 03:45 PM.

  5. #5
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    That book looks really good, I will take a look at the sample chapters on SAMS website.

    Is it C++ based?

  6. #6
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    It uses C so more people can follow along, but it uses C++ here and there when needed. Nothing obscure. In fact, there's a C++ primer in the back too if you need it.

  7. #7
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    Any other books that people would thoroughly recommend.

  8. #8
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    To be honest, this is the only good book that puts a whole focus on 2d game development and algorithms. If you pick up another book, it will most likely teach you "this is how you draw a square, now lets make it 3d and stay 3d for now on." There is Focus on 2D in Direct3D, but it will teach you 2D graphics, but then there's hardly anything on windows programming, game algorithms and so on. You would be going down the wrong path and end up looking for answers all over the internet which is already cluttered with misinformation and inexperienced people. I'm not saying all of them are, but you can pretty much start looking for a new career. Good luck.
    Last edited by dxfoo; 09-04-2006 at 09:31 AM.

  9. #9
    Registered User
    Join Date
    Nov 2005
    Posts
    545
    I am not looking for a career, I am looking to further my programming career. I want a career with McLaren Mercedes but that is another subject.

  10. #10
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I always recommend this book for beginners: Tricks of the Windows Game Programming Gurus by Andre' Lamothe. It will teach you 2d game programming coming from someone with 22+ years of experience. It also covers input, sound, AI, physics, etc. You can find it here with several reviews:

    http://blog.markwshead.com/info2/Tri...-Edition).html

    Once you're done, he has a second volume on 3d software rasterization. Software?! Yes, he believes if you're going to be a graphics programmer, you need to know how it works underneath. Who builds the graphics cards, etc.? But once you finish this book, going to any hardware accelerated graphics API (OpenGL, Direct3D) can be learned in a matter of two weeks. He is planning a third volume to cover hardware acceleration with a DOOM-like engine. Anyway, I believe it is a good educational series starting from the ground up. It's a little pricey, but it's the best book series ever in my opinion. If you can't complete this book, it's a good thing actually because you're glad you didn't try adding a third deminsion in the first place and ended up wasting your time.
    I will never recommend another Lamothe book. His algorithms are slow, outdated, and his non-C++ approach to engine design is horrific. If you are going to make a game engine I would not recommend following the design patterns presented in Lamothe's books. I also have not seen any games that Lamothe has released and the overall writing style is a tad annoying.

    I'm not saying you cannot learn anything from them as I have several of them but only use them for reference. You will have to completely re-design the methods presented in the books to make them of any use.

    A very good book is 'Game Code Complete, 2nd edition'.


    Note that you will NOT find a book that covers everything you need. I recommend buying as many books as possible on as many topics as possible to get a broad coverage. It's sort of like doing a research paper. You wouldn't bank your entire grade on 3 sources, likewise, you don't want to create your own game engine using just 3 resources. You need specialized books about audio, scripting, multi-play, resource management, design patterns, etc, etc. If you want a truly awesome PC, stereo system, car, or whatever, you buy the pieces you want and put them together. If you just settle for what the company gives you (Dell, Sony, Dodge) and stay OEM, you will not get the performance of a hand-crafted hand picked system. Same thing with programming.
    Last edited by VirtualAce; 09-04-2006 at 10:06 PM.

  11. #11
    Registered User Rennor's Avatar
    Join Date
    Aug 2006
    Location
    Finland
    Posts
    45
    Scary! Just a thought. If someone is getting into game programming then it is my belief that all these "engine mumble" and "hardware this and that accelerated bits and tricks" aint for any good.

    I still prefer to start from the bottom. Write a game like they did back when C64 was yet to be born. Learn how to draw a "sprite" and start off with a game using it. Like, pong! Suggested book would be best be something that explains such basics.

    Bubba said it well, "as many books as possible on as many topics as possible to get a broad coverage". But still it would be best done by buying one book covering simple basics, try out things, learn... then maybe suggestions for books is not needed anymore, insight to whole genre starts to get shape. Or you can "skip" books now and try out some library like SDL, they have alot of opensource projects around the internet and you can easily learn from tutorials and source codes. Once you cover the ground bottom you can look up into the skies where MMO's and huge engines float and gloat


    Back in '97 I bought "Black Art of 3D Game Programming: Writing Your Own High-Speed 3D Polygon Video Games in C (Paperback)" from asm'97 and it's still yet my only book covering game programming. I aint actually recommending it... but then again, I never finished any of my game projects.

  12. #12
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Well who said anything about finishing projects?

    I've finished a few but mostly what I have are like tech demos demonstrating this technique or that. Sticking it all together in a game is quite a challenge.

  13. #13
    Registered User
    Join Date
    Sep 2006
    Posts
    5
    i don't know if this helps...but i was going to get the book "beginning C++ game programming" by shephan prata(at least i think it was his book). some people i know said that the book was good if you only know a bit of C++.

  14. #14
    Software engineer
    Join Date
    Aug 2005
    Location
    Oregon
    Posts
    283
    I still say Tricks Of course, there's going to be some bad algorithms (in any book), but the idea is to read a ton of books and learn how you can make even better algorithms, then compare each algorithm with your local friends. Why is your algorithm better? You start learning from one another. With Tricks though, you're learning to write a software rasterizer in 2d (volume II is 3d software rasterization), and ask any company, software rasterization was never entirely figured out. If it works, it works. It was never mastered. But the idea of doing this is getting an edge on your resume saying that you can draw 3d objects without any hardware acceleration on the machine. You would be a much more valuable employee with a proven passion in graphics than some programmer who relys on hardware to do the job. You will be taken more seriously. The great thing with Tricks is it takes you in as a beginner and takes you out as a very educated person in graphics. Once you read the two volumes, moving to any API will be very easy. You already did all the hard work. But if you're not in school studying computer science or some relatable major, you can use C# and take advantage of hardware acceleration right away. I don't care. The reason why I recommond it is simply because of educational value. Everything else just teaches you how to draw a cube on the screen and say you're a game programmer at the very end. I don't think so! Don't worry about what API you use - people complain about Tricks being outdated with DirectDraw in the first volume. The API should be the last concern. I'd be happy if I had my amiga here and I could just program on that and carry over to Direct3D with the same graphics knowledge. Just learn graphics, and you will be able to use any API today and in the future. All I can say is be competative in today's world with specializing in graphics, not "games." Show your passion in graphics programming. Even as a beginner you can start today with the Tricks series. At any rate, just learn from the ground up! Again, I learn it for educational value but also to stay competative in the knowledge base. I don't claim to know it all, but I know what it takes to get that extra edge, and I'll definitely take the heat for always yelling out "Tricks!" But then again too, it's just a passion for learning graphics from the inside-out.

    Read this article too to get a better idea in what a company is looking for. At the end, ask yourself if you have that edge companies are looking for. And, finally, see if you still have that same passion at the end.

    Finding Great Developers:
    http://joelonsoftware.com/articles/F...evelopers.html
    Last edited by dxfoo; 09-07-2006 at 10:04 PM.

  15. #15
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I still say Tricks Of course, there's going to be some bad algorithms (in any book), but the idea is to read a ton of books and learn how you can make even better algorithms, then compare each algorithm with your local friends. Why is your algorithm better? You start learning from one another. With Tricks though, you're learning to write a software rasterizer in 2d (volume II is 3d software rasterization), and ask any company, software rasterization was never entirely figured out. If it works, it works. It was never mastered. But the idea of doing this is getting an edge on your resume saying that you can draw 3d objects without any hardware acceleration on the machine. You would be a much more valuable employee with a proven passion in graphics than some programmer who relys on hardware to do the job. You will be taken more seriously. The great thing with Tricks is it takes you in as a beginner and takes you out as a very educated person in graphics. Once you read the two volumes, moving to any API will be very easy. You already did all the hard work. But if you're not in school studying computer science or some relatable major, you can use C# and take advantage of hardware acceleration right away. I don't care. The reason why I recommond it is simply because of educational value. Everything else just teaches you how to draw a cube on the screen and say you're a game programmer at the very end. I don't think so! Don't worry about what API you use - people complain about Tricks being outdated with DirectDraw in the first volume. The API should be the last concern. I'd be happy if I had my amiga here and I could just program on that and carry over to Direct3D with the same graphics knowledge. Just learn graphics, and you will be able to use any API today and in the future. All I can say is be competative in today's world with specializing in graphics, not "games." Show your passion in graphics programming. Even as a beginner you can start today with the Tricks series. At any rate, just learn from the ground up! Again, I learn it for educational value but also to stay competative in the knowledge base. I don't claim to know it all, but I know what it takes to get that extra edge, and I'll definitely take the heat for always yelling out "Tricks!" But then again too, it's just a passion for learning graphics from the inside-out.

    Read this article too to get a better idea in what a company is looking for. At the end, ask yourself if you have that edge companies are looking for. And, finally, see if you still have that same passion at the end.
    I still say Tricks Of course, there's going to be some bad algorithms (in any book), ....
    Really? Then why buy the book?

    With Tricks though, you're learning to write a software rasterizer in 2d (volume II is 3d software rasterization), and ask any company, software rasterization was never entirely figured out. If it works, it works. It was never mastered.
    2D rasterization was never figured out eh? Ok if it was never mastered then how the hell does our 3D card do it? Is it using some kind of magical math voodoo? This statement is absurd. It does work and it has been mastered. How else do you think an NVidia or ATI card can have a fillrate of 20 million triangles per second? The algos they employ are the hardware versions of the old DOS software algos. Be assured my mislead friend....they do work. Hell you can write a software rasterizer in BASIC and I know b/c I was stupid enough to do it using Screen 9 graphics. Look up DJGPP and some of the engines made with it - they also do software rasterization.
    But again you are missing the point. Rasterization is no longer a needed black art or skill b/c even the cheapest of cheap video cards does it for you. DirectX and OpenGL are about a million miles from rasterizers - in fact they never let you get close to the buffers w/o slapping you with a performance hit.
    Game companies are looking for people to write rasterizers eh? I think not.

    www.gamasutra.com
    www.gamedev.net
    Check the jobs section to see what they are really looking for. Tricks is so outdated it isn't even applicable.

    But the idea of doing this is getting an edge on your resume saying that you can draw 3d objects without any hardware acceleration on the machine. You would be a much more valuable employee with a proven passion in graphics than some programmer who relys on hardware to do the job. You will be taken more seriously.
    So saying you can code an ancient 2D rasterizer which has nothing to do with D3DX, DXUT, GLUT, OpenGL or anything close to something written since like Windows 98 first edition is an edge on your resume? While understanding rasterization is good, it's not vital and it's certainly not going to look any better on a resume. If you even mention rasterizer at a 3D game company I'm sure they will laugh unless it's for a cell phone or PDA or something like it. They won't take you seriously since you are seriously in the stone ages when it comes to graphics.

    The great thing with Tricks is it takes you in as a beginner and takes you out as a very educated person in graphics. Once you read the two volumes, moving to any API will be very easy.
    Add in about 3 weeks worth of code rework just to get the samples to work correctly and efficiently. Also you will have to fit all of it into your design which is tough since almost none of it is written in C++ and if it is, it's pseudo C++ - like he couldn't determine if he wanted to use C or C++ so he used C with a bit of C++ which ends up being a mess.

    ...people complain about Tricks being outdated with DirectDraw in the first volume.
    Um yeah with due cause. DirectDraw was combined with Direct3D as of DirectX 8.0 and is now called DirectGraphics. The Lamothe DirectDraw surface stuff does not even apply anymore because there are much better ways to do the same things. Texture blending, effects, bump mapping, etc, etc, can now all be done in shaders. You never want to access the surface directly. There isn't a BLIT in Direct3D, and there isn't a color key. It's all about alpha blend states and alpha blending.

    All I can say is be competative in today's world with specializing in graphics, not "games." Show your passion in graphics programming. Even as a beginner you can start today with the Tricks series. At any rate, just learn from the ground up! Again, I learn it for educational value but also to stay competative in the knowledge base.
    Yet most game companies want at least 1 published title under your belt regardless if you are the 2D rasterizer king of the world. Nearly every company is 100% tired of getting samples of just another renderer. They want to see projects that do something, that are complete, and that show skill at not just graphics but solving problems. Graphics to be honest is the easiest part of 3D game programming. Anyone can get good graphics with decent modellers and decent artists. Game programming is NOT just about graphics. Most game programmer positions will have you doing a hell of lot more than just graphics. So if they are tired of 3D renderers, what do you think they are gonna do with a software 3D renderer with a 2D software rasterizer? Probably stick it in file 13.

    I don't claim to know it all, but I know what it takes to get that extra edge, and I'll definitely take the heat for always yelling out "Tricks!" But then again too, it's just a passion for learning graphics from the inside-out.
    Well none of us know it all but I'm afraid you don't know what it takes to get that extra edge because nothing you've said will give it to you. And if you constantly take heat for supporting the book don't you ever begin to wonder why? Your passion is fine and admirable, but let's not get passion mixed up with practicality.


    The part I agree with is understanding graphics and how they work. The part I disagree with is that Tricks is going to lead you to that understanding or that you have to code your own rasterizer to understand the process. There are much better beginning books out there that teach you far more than Tricks and in a much better format - and they use C++ through and through. Coding a rasterizer is a waste of time. Messing around with OGL or DX is not.
    Understand the fundamentals, but don't limit yourself to them.
    Last edited by VirtualAce; 09-08-2006 at 12:37 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Conversion of pointers to functions
    By hzmonte in forum C Programming
    Replies: 0
    Last Post: 01-20-2009, 01:56 AM
  2. sorting the matrix question..
    By transgalactic2 in forum C Programming
    Replies: 47
    Last Post: 12-22-2008, 03:17 PM
  3. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  4. Can you check what is wrong with this code
    By Ron in forum C++ Programming
    Replies: 4
    Last Post: 08-01-2008, 10:59 PM
  5. 2D Game project requires extra C++ programmers, new or experienced
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 05-16-2007, 10:46 AM