Archived

This topic is now archived and is closed to further replies.

Muzlack

Zen of direct3d programming

Recommended Posts

Alright, everyone said I should get the Zen of Direct3d Game Programming, so I got it. They said the first half of the book is about 2d programming in d3d. Now, I was under the assumption that I would be learning about textured quads and whatnot, but from what I can tell, the only thing they really change is the names, instead of LPDIRECTDRAWSURFACE7 they have LPDIRECT3DSURFACE8. And from what I hear, most people use textured quads or the sprite class that comes with d3d8 (can''t remember the name). So, why should I not use this? What is better about textures other than they are slow to load and have to be in powers of two in width and height? Is d3d using surfaces faster than ddraw using surfaces? Is d3d using textures faster than ddraw using surfaces? What is the best possible way to make a 2d game?

Share this post


Link to post
Share on other sites
I bought this book to learn DX 8 as well. I''ve noticed that Walsh''s code for doing 2D using the backbuffer and surfaces is a lot slower than the equivalent using textured quads (this is on a GeForce 2).

I think modern video-card hardware will work with the textured-quad approach much faster than with the old-style Direct7 way of doing 2D. Plus you can take advantage of matrix transformations and special visual effects.

As many people have pointed out in these forums, Walsh''s book has its good points but is filled with erroneous code and some really inefficient ways of doing things (case in point: creating, locking/unlocking, and destroying vertex buffers and index buffers EVERY frame of animation).

Having said that, I liked the book because it helped me past the initial learning curve of DirectX programming. Luckily, I knew C++ before buying it (so I could debug Walsh''s errors).

It''s probably not the best book in the world to learn this stuff with...

--Hoozit.

Share this post


Link to post
Share on other sites