Tricks of the Windows Game Programming Gurus still good today?

Started by
17 comments, last by nobodynews 17 years, 9 months ago
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.

Advertisement
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.

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!

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".
h20, member of WFG 0 A.D.
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.

Beginner in Game Development?  Read here. And read here.

 

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.

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]).

F-R-E-D F-R-E-D-B-U-R...G-E-R! - Yes!
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.

Beginner in Game Development?  Read here. And read here.

 

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.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This topic is closed to new replies.

Advertisement