• Advertisement
Sign in to follow this  

Tricks of the Windows Game Programming Gurus still good today?

This topic is 4214 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 can pick up this book for very cheap. But I need recommendations/advice. I'm still trying to find a good book to help me get my foot in the door with game programming. I don't really need a book that goes into detailed tutorials on C/C++, but I want a book that will help me to start applying C++ to games. I read good feedback on Tricks of the Windows Game Programming Gurus, but most came from those who got the book years ago. From looking up the books topics, it seems to be right up my alley in terms of content. Example of Game Loops, Win32 exe games rater than just console games, fundamentals of 2D games programming and DirectX*, vector rasterization and 2D Transformation, and some fundamental techniques such as clipping algorithms, basic A.I., memory mananagement, and multithreading. The reason for the asterisk besides DirectX is because it uses DirectX 6.1 and I know there is a big chance that the code is incompatible with the DirectX 9 SDK. Personally, I question whether or not its even worth the time and effort to be learning an outdated version of DirectX, let alone try to find a place where I can still download the DX6.1 SDK. But my big question regarding the book is this, besides the book being dated, and possibly the coding "uncompiliable" with DX 9.0 and recent compilers, is it still worth it for the fundamentals/skills the book teaches? And other the other hand, are there quality books that use recent APIs that teach important game programming fundamentals like this one did? And I've been recommended in the past to not start off with DX or even OpenGL and start learning something simpler like SDL or Allegro. Its that the way to go for a beginner? And is the second edition of Windows Game Programming Gurus(covers 3D games) more up-to-date and worth it? Any help is appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Tricks of the Windows Game Programming Guru teaches 2D techniques, which may consider "old-school" but it is very much relevant to any 2D programming.

Tricks of the 3D Game Programming Gurus teaches 3D software rasterization. As in your 3D games, won't use D3D or OGL to make the triangles and polygons. It will be strictly using software (similar to the original Quake).

So there's much to learn if you're not hung up with the "latest and the greatest".

Share this post


Link to post
Share on other sites
If you're just trying to start game programming and you already know C/C++ (LaMothe uses more C than C++ but tries to use more C++ in the Second Edition) then this book should be just fine.

Quote:

The reason for the asterisk besides DirectX is because it uses DirectX 6.1 and I know there is a big chance that the code is incompatible with the DirectX 9 SDK. Personally, I question whether or not its even worth the time and effort to be learning an outdated version of DirectX, let alone try to find a place where I can still download the DX6.1 SDK.
If you do decide to get it get the Second Edition not the first. It covers a few more topics and it uses DirectX 8.1 (DirectDraw7) and it comes with a CD so you don't have to worry about downloading the SDK. I'm using MSVC++ 2005 (8) and most of the code works fine. You shouldn't have to do much major code tweaking. The book (Second Edition) does come with VC++ 6 so you can compile the code with that but most modern compilers should work just as well.

Share this post


Link to post
Share on other sites
I happen to own a copy of Tricks of the Windows Game Programming Gurus, and I can tell you for a fact that its code is incompatible with modern compilers and versions of DirectX. It's not so far off that you couldn't tweak the code to get it working, but it would be a pain to do so. DirectX 6.1 is quite out of date, and while this is not by itself such a big problem (each version of the DirectX runtime exposes interfaces for all previous DX versions for compatibility with older games), you really ought to find a book that teaches at least DirectX 8, because the graphics components of DirectX were refactored with DirectX 8 to be much easier to work with for both 2D and 3D applications. You'll also find it much easier to switch between 2D and 3D graphics under DX 8 and newer because they use the same API. As to the second edition of Tricks -- actually it doesn't cover 3D games; it appears to be just an update of the original for DirectDraw 7, which is still the old style graphics API. I believe what you are actually thinking of is Tricks of the 3D Game Programming Gurus-Advanced 3D Graphics and Rasterization, which does cover 3D programming and is by the same author. However, that would be a bad choice as an introductory book, since it is about writing a software 3D renderer, rather than about using the hardware accelerated renderer exposed through Direct3D and OpenGL. Although they're interesting, nobody uses software renderers for 3D on the PC anymore, for a variety of good reasons. Unless you plan to develop for a platform that lacks 3D hardware acceleration (think cellphones or graphing calculators), you'll be much better off learning to harness the power of modern graphics cards through Direct3D or OpenGL. I haven't tried to buy an up to date book on the subject recently, so I can't offer any specific recommendations, but there were plenty to chose from a couple of years ago when I bought my last one, so it shouldn't be too hard. Just stay away from the Tricks books.

Share this post


Link to post
Share on other sites
Still good? [imo] this was never good. Even at release it covers things that you as a programmer won't have to and shouldn't have to cover. LaMothe's code style is questionable at best. As a beginner you should be focusing on learning programming; proper program design, getting things done, learning to debug effectively, finding and integrating libraries to do stuff for you...

This book will teach you very little except poor coding practices you'll have to ignore or unlearn later.

Share this post


Link to post
Share on other sites
Quote:
Original post by Telastyn
Still good? [imo] this was never good. Even at release it covers things that you as a programmer won't have to and shouldn't have to cover. LaMothe's code style is questionable at best. As a beginner you should be focusing on learning programming; proper program design, getting things done, learning to debug effectively, finding and integrating libraries to do stuff for you...

This book will teach you very little except poor coding practices you'll have to ignore or unlearn later.


Well I actually already have experience programming in C++, i'm currently a Computer Science major. I just want to learn how to apply the language to games, thats why I really don't need a book that dedicates a good fraction of itself to C++ tutorials, I already have plenty of references to the language itself, but it doesn't hurt if its still clearly focused on the application. I'm not a beginner to the language, just a beginner to game applications of the language.

Judging by reviews I read and you guys' comments, here, I guess I'll pass on the "Tricks". Many people have said his programming techniques are questionable, constantly doing things like using loads of global variable for optimization, etc. I guess i'll look for something more modern and something that uses at least DirectX 8, ideally 9, or even OpenGL. Another book I had in mind was Game Programming All In One by Bruno Miguel Teixeira de Sousa.

Ideally, I would like to be introduced to Windows Programming in 2D and learn many fundamentals in that world before adding entering 3D. If anyone else has any book recommendations, please share. And thanks to all those who have responded so far.

Share this post


Link to post
Share on other sites
Well there was a Hands-On Interactive Tutorial here on making Tetris with DDraw 7.0. It used far better coding structure than Tricks, explained the techniques, and is applicable to current 2D game programming. The staff took it offline though [sad] But the link may still be alive. I'll search and see...

edit: Found it! and Accompanying Code.

edit2: agree with poster below.

[Edited by - Alpha_ProgDes on July 4, 2006 8:40:59 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by mumpo
I happen to own a copy of Tricks of the Windows Game Programming Gurus, and I can tell you for a fact that its code is incompatible with modern compilers and versions of DirectX. It's not so far off that you couldn't tweak the code to get it working, but it would be a pain to do so. ... Just stay away from the Tricks books.


It isn't a "pain" to tweak the code; with a single line, you can just tell your DX to use the old interfaces. Lamothe's books aren't about using the absolute latest and greatest 3D-accelerated technology, but he covers the fundamentals of computer graphics and game programming. He uses an old DX interface called DirectDraw which has been discontinued by Microsoft, but it is a great way to learn 2D graphics since you get direct access to the screen. In fact, DDraw is very similar to virtually all 2D graphics libraries out there.

So, you should look at your motivation for learning game programming. If you want to only learn the latest and greatest technologies, don't go with the Tricks series. If you want to learn how computer graphics and game programming works at a rather low level, the Tricks series is probably a good choice (if you don't mind sometimes verbose explanations). If your goal is just to quickly learn how to make games, the Tricks series probably isn't the way to go.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alpha_ProgDes
Well there was a Hands-On Interactive Tutorial here on making Tetris with DDraw 7.0. It used far better coding structure than Tricks, explained the techniques, and is applicable to current 2D game programming. The staff took it offline though [sad] But the link may still be alive. I'll search and see...

edit: Found it!


Ahh, those are some useful topics/links I can go through, thank!

Share this post


Link to post
Share on other sites
Quote:
Original post by VWarrior
Ideally, I would like to be introduced to Windows Programming in 2D and learn many fundamentals in that world before adding entering 3D. If anyone else has any book recommendations, please share. And thanks to all those who have responded so far.


The thing is, there aren't any modern books out there that only teach 2D. The audiences want 3D stuff, so the book companies seem to really push for 3D. In my opinion, most of the newer books on "3D and DX" actually cover surprisingly little since they're ALSO aimed at complete beginners to game programming (or even to programming, as evidenced by the All-In-One book you mentioned -- it seems to cover a lot of topics, greatly sacrificing detail). If you look for more advanced books on "3D and DX", you have to look at collections of papers or textbooks (i.e. the Gems series).

That being said, it's a lot easier to do 2D graphics nowadays since you don't have to worry about things like loading, drawing, rotating, "transparencying" bitmaps since all of this is done with very simple D3DX calls. So, I bet you could learn these calls on your own just through Internet tutorials. Like I said, if you want to know how 2D graphics really work at a very low level, LaMothe's Tricks book would be a good choice. Otherwise, you don't really have to know HOW 2D graphics work anymore to use them. It's a shame, but at the same time it really enables developers to write games more quickly.

Share this post


Link to post
Share on other sites
Quote:
Original post by mnansgar
Quote:
Original post by mumpo
I happen to own a copy of Tricks of the Windows Game Programming Gurus, and I can tell you for a fact that its code is incompatible with modern compilers and versions of DirectX. It's not so far off that you couldn't tweak the code to get it working, but it would be a pain to do so. ... Just stay away from the Tricks books.


It isn't a "pain" to tweak the code; with a single line, you can just tell your DX to use the old interfaces. Lamothe's books aren't about using the absolute latest and greatest 3D-accelerated technology, but he covers the fundamentals of computer graphics and game programming. He uses an old DX interface called DirectDraw which has been discontinued by Microsoft, but it is a great way to learn 2D graphics since you get direct access to the screen. In fact, DDraw is very similar to virtually all 2D graphics libraries out there.

So, you should look at your motivation for learning game programming. If you want to only learn the latest and greatest technologies, don't go with the Tricks series. If you want to learn how computer graphics and game programming works at a rather low level, the Tricks series is probably a good choice (if you don't mind sometimes verbose explanations). If your goal is just to quickly
learn how to make games, the Tricks series probably isn't the way to go.


Well my ultimate goal is the achieve the ability to program games with the latest and greatest technologies. However, my mentality towards this is to start simple and small, learn the fundamentals of game programming, experience firsthand how to program a game while inclining myself towards the technology that is most relevant to what is practical in modern-day game programming. Whats the point in learning technologies and techniques that aren't used anymore in the industry? I make an exception for 2D games because I look at the 2nd dimension as my training ground, and the 3rd dimension as the beginning of my journey into the abyss.

So I first want to learn about to apply the C++ language to games, to learn how to code a fully functional game, that takes input, draws graphics, has A.I. (no matter how dumb it is), incorporates game programming fundamentals into the code such as the game loop, game states, using an API, etc.

Once I have that down, then i'll move onto 3D. So i'm in no rush. I just want to gain a fundamental understanding of what i'm doing, and then gradually increase the complexity of the games I make.

Share this post


Link to post
Share on other sites
Quote:
Original post by mnansgar
Quote:
Original post by VWarrior
Ideally, I would like to be introduced to Windows Programming in 2D and learn many fundamentals in that world before adding entering 3D. If anyone else has any book recommendations, please share. And thanks to all those who have responded so far.


The thing is, there aren't any modern books out there that only teach 2D. The audiences want 3D stuff, so the book companies seem to really push for 3D. In my opinion, most of the newer books on "3D and DX" actually cover surprisingly little since they're ALSO aimed at complete beginners to game programming (or even to programming, as evidenced by the All-In-One book you mentioned -- it seems to cover a lot of topics, greatly sacrificing detail). If you look for more advanced books on "3D and DX", you have to look at collections of papers or textbooks (i.e. the Gems series).

That being said, it's a lot easier to do 2D graphics nowadays since you don't have to worry about things like loading, drawing, rotating, "transparencying" bitmaps since all of this is done with very simple D3DX calls. So, I bet you could learn these calls on your own just through Internet tutorials. Like I said, if you want to know how 2D graphics really work at a very low level, LaMothe's Tricks book would be a good choice. Otherwise, you don't really have to know HOW 2D graphics work anymore to use them. It's a shame, but at the same time it really enables developers to write games more quickly.


Well, that being said, do you think a beginner could begin game programming learning in 3D? I always thought/felt it was better to start in 2D. But like you said, 2D isn't used anymore, mainstream games are 3D, so the focus on learning how to create them are in 3D.

The tradeoff I see with learning 2D is that it seems to be an easier place to start for a beginner, but you're forced to used outdated tools.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alpha_ProgDes
Well there was a Hands-On Interactive Tutorial here on making Tetris with DDraw 7.0. It used far better coding structure than Tricks, explained the techniques, and is applicable to current 2D game programming. The staff took it offline though [sad] But the link may still be alive. I'll search and see...

edit: Found it! and Accompanying Code.

edit2: agree with poster below.


Cool, thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by VWarrior
The tradeoff I see with learning 2D is that it seems to be an easier place to start for a beginner, but you're forced to used outdated tools.


I guess what I meant to say in my last post is that 2D is so easy nowadays that you probably couldn't write an entire book on it if you tried. In the past, you had to worry about a lot of low-level stuff, so books like TWGPG were possible. Now, you (1) have tons of high-level 2D function calls, and (2) we don't work with graphics at the per-pixel level anymore, instead shifting our viewpoint to polygons and higher-level entities. So, 2D in the newer DX libraries is treated as a "special-case" 3D where the viewing plane is immediately in front of the viewer.

Being a CS major, it would probably be easy for you to pick up 2D DX pretty quickly, unless you're interested in how it works "under the hood".

Share this post


Link to post
Share on other sites
Quote:
Original post by VWarrior
Quote:
Original post by mnansgar
Quote:
Original post by VWarrior
Ideally, I would like to be introduced to Windows Programming in 2D and learn many fundamentals in that world before adding entering 3D. If anyone else has any book recommendations, please share. And thanks to all those who have responded so far.


The thing is, there aren't any modern books out there that only teach 2D. The audiences want 3D stuff, so the book companies seem to really push for 3D. In my opinion, most of the newer books on "3D and DX" actually cover surprisingly little since they're ALSO aimed at complete beginners to game programming (or even to programming, as evidenced by the All-In-One book you mentioned -- it seems to cover a lot of topics, greatly sacrificing detail). If you look for more advanced books on "3D and DX", you have to look at collections of papers or textbooks (i.e. the Gems series).

That being said, it's a lot easier to do 2D graphics nowadays since you don't have to worry about things like loading, drawing, rotating, "transparencying" bitmaps since all of this is done with very simple D3DX calls. So, I bet you could learn these calls on your own just through Internet tutorials. Like I said, if you want to know how 2D graphics really work at a very low level, LaMothe's Tricks book would be a good choice. Otherwise, you don't really have to know HOW 2D graphics work anymore to use them. It's a shame, but at the same time it really enables developers to write games more quickly.


Well, that being said, do you think a beginner could begin game programming learning in 3D? I always thought/felt it was better to start in 2D. But like you said, 2D isn't used anymore, mainstream games are 3D, so the focus on learning how to create them are in 3D.

The tradeoff I see with learning 2D is that it seems to be an easier place to start for a beginner, but you're forced to used outdated tools.

I'm pretty sure there are 2D game programming books and tutorials that use a 3D API (such as D3D or OGL). That way you are learning to use the 3D API and make a 2D game. Then the transition from 2D to 3D becomes that much easier.

Share this post


Link to post
Share on other sites
Quote:
Original post by Alpha_ProgDes
Quote:
Original post by VWarrior
Quote:
Original post by mnansgar
Quote:
Original post by VWarrior
Ideally, I would like to be introduced to Windows Programming in 2D and learn many fundamentals in that world before adding entering 3D. If anyone else has any book recommendations, please share. And thanks to all those who have responded so far.


The thing is, there aren't any modern books out there that only teach 2D. The audiences want 3D stuff, so the book companies seem to really push for 3D. In my opinion, most of the newer books on "3D and DX" actually cover surprisingly little since they're ALSO aimed at complete beginners to game programming (or even to programming, as evidenced by the All-In-One book you mentioned -- it seems to cover a lot of topics, greatly sacrificing detail). If you look for more advanced books on "3D and DX", you have to look at collections of papers or textbooks (i.e. the Gems series).

That being said, it's a lot easier to do 2D graphics nowadays since you don't have to worry about things like loading, drawing, rotating, "transparencying" bitmaps since all of this is done with very simple D3DX calls. So, I bet you could learn these calls on your own just through Internet tutorials. Like I said, if you want to know how 2D graphics really work at a very low level, LaMothe's Tricks book would be a good choice. Otherwise, you don't really have to know HOW 2D graphics work anymore to use them. It's a shame, but at the same time it really enables developers to write games more quickly.


Well, that being said, do you think a beginner could begin game programming learning in 3D? I always thought/felt it was better to start in 2D. But like you said, 2D isn't used anymore, mainstream games are 3D, so the focus on learning how to create them are in 3D.

The tradeoff I see with learning 2D is that it seems to be an easier place to start for a beginner, but you're forced to used outdated tools.

I'm pretty sure there are 2D game programming books and tutorials that use a 3D API (such as D3D or OGL). That way you are learning to use the 3D API and make a 2D game. Then the transition from 2D to 3D becomes that much easier.


Combined with mnansgar's post, I guess that is what I'll do. To be honest, I'm not too concerned with how 2D graphics work, really just how to use them. Again, I really only see 2D game programmng as a stepping stone towards the 3D work. Its just my training wheels. In fact, I think Game Programming All-In-One uses DirectX for 2D games, so i'll look even deeper into that book. And like you said, using a 3D API such DX and OpenGL to draw 2D graphics allows me to gain experience using them in the first place, making the inevitable 3D transition easier.

What you guys seem to be saying is 2D graphics rendering is treated as sort of a push-over skill nowadays with 3D APIs. With that in mind, I guess I don't really need Tricks, and I'll go for something more modern that uses at least Direct X 8 or OpenGL for 2D games. Then i'll transition into 3D games using those APIs.

Share this post


Link to post
Share on other sites
Quote:
Original post by Telastyn
Still good? [imo] this was never good. Even at release it covers things that you as a programmer won't have to and shouldn't have to cover. LaMothe's code style is questionable at best. As a beginner you should be focusing on learning programming; proper program design, getting things done, learning to debug effectively, finding and integrating libraries to do stuff for you...

This book will teach you very little except poor coding practices you'll have to ignore or unlearn later.
LaMothe's books aren't supposed to teach you programming; you should already be a proficient programmer before reading any game programming book (except those meant to teach you programming, of course[smile]).

Share this post


Link to post
Share on other sites
Quote:
Original post by DigiDude
Quote:
Original post by Telastyn
Still good? [imo] this was never good. Even at release it covers things that you as a programmer won't have to and shouldn't have to cover. LaMothe's code style is questionable at best. As a beginner you should be focusing on learning programming; proper program design, getting things done, learning to debug effectively, finding and integrating libraries to do stuff for you...

This book will teach you very little except poor coding practices you'll have to ignore or unlearn later.
LaMothe's books aren't supposed to teach you programming; you should already be a proficient programmer before reading any game programming book (except those meant to teach you programming, of course[smile]).

True. He did require that you know C before attempting anything in the book. Alot of what's in that book is C. There's barely any C++ in that book.

Share this post


Link to post
Share on other sites
If you DO want to learn 2D programming I seriously recommend SDL and learn it by reading

http://lazyfooproductions.com/SDL_tutorials/index.php

I looked through it and I think they're very well done tutorials. Then you can jump into 3D programming if you desire. Hope that helps.

Share this post


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

  • Advertisement