Main Site Links Resources Tutorials
News VB Gaming Code Downloads DirectX 7
Contact Webmaster VB Programming Product Reviews DirectX 8
  General Multimedia Articles DirectX 9
      Miscellaneous

DirectX 8 and Visual Basic Development
Author: Keith Sink
Publisher: Sams
ISBN: 0-672-32225-0
Purchasing: [Amazon.Com
] [Fatbrain.Com] - RRP US$39.99
Reviewed: 16th December 2001

Front Cover Shot:

Overview

I wasn't really very sure what to think of a book like this before I actually got it; Having been aware of it coming for quite a while now, and knowing that this was (and is) the only book on the subject. This is simply based on the fact that the DirectX 8 API is an absolutely massive library - with 5 main sections, each warranting their own book all-together. This book weighs in at 459 pages, which by simple maths would leave 91.8 pages per section (ignoring contents/introduction/index etc...); and as I already said, each element of the DirectX API warrants it's own book fullstop - such that 91.8 pages makes for quite a small book ;)

The Origins

This book is not aimed at games programming - the author makes this fairly clear from the start, instead, it's aimed at general multimedia usage and more specifically towards business applications. Things such as "Use Direct3D to show off models of your products to the customers"... which is a perfectly valid usage of DirectX, but probably not what most programmers will be using it for. This is a good thing to a certain extent, because adding game programming into the mix makes things much more complicated, and as it stands this book will teach you DirectX - not DirectX AND games.

The Actual Book

The book itself is well laid out - as with the majority of the sams books, it is cleanly divided into sections/chapters, and they all follow a logical order. The writing style is good, and easy to follow - he makes good use of examples to illustrate features/ideas, which makes it much easier to read through. My only reservation with the layout/design of this book is the code samples - There are several pages taken up with lists and lists of functions with very little explanation; and the actual code is not always easy to copy into VB to experiment with.

This brings me onto one other point - there is NO accompanying CD, which I think is a big mistake on their part. I dont really like having to spend half-an-hour copying up 10 pages of text only to find that there's bits missing, or that I've made lots of typing errors. For example, he sometimes uses little helper functions "GetVector()" for example, whilst this is only a trivial problem, it is never discussed, and the code for these functions is never shown. Given that almost every computer manual now ships with the source/tools on the CD for you to look at while reading/learning I dont know why there is no CD with this book. It is partially made up for by including links where you can DOWNLOAD the source code, but I found that some places either had no links, or were quite large to download (not a problem unless you're still using a 56k modem like me!). But I do feel a little sour that I have to spend my time (and more money) searching the net for the code examples. The other aspect to this is that you'll need to download the DirectX8 SDK from microsoft - whilst a cut down VB-only version exists, to get the most of the API you should get the full version, which is 180+mb, which will take enough time even on a cable modem. I dont know if the microsoft licence would allow Sams to include the SDK on a cd, but it would have been an excellent thing to do.

The Content

Now the important part - the content of the book, what you are actually paying your good money for...

What is covered in this book is covered well, but there are some major gaps in the content, this is the result of only having (roughly) 90 pages per area of DirectX - and perfect justification for having a whole book on each area. This book quite clearly sacrifices depth in favour of being broad, it covers every section of DirectX, but only at a taster/very low level.

My main area of interest is Direct3D, thus I couldn't stop myself from pulling apart the Direct3D chapters for errors, missing parts and bad ideas. It would be very very difficult to go do anything remotely complicated in Direct3D having only learnt the content in this book. Even if you did, it probably wouldn't work on many computers...

There is little mention of enumeration - an aspect so vital with DirectX programming that the author should be shot! on page 131 he discusses creating a D3D device (using CreateDevice) and he specifies D3DCREATE_HARDWARE_VERTEXPROCESSING as one of the parameters, and whilst he does give a brief mention to the existance of D3DCREATE_SOFTWARE_VERTEXPROCESSING he completely ignores the fact that only certain 3D cards will support the code he's using... thus anyone not familiar with this (ie, most of his readers) will type this code in blindly and sit there scratching their heads wondering why it's not working... when a simple 4-5 lines of enumeration code would have solved the problem before it became an issue...

He is also a little bit brief with Direct3D Lighting - no mention of different types (point/spot/directional/ambient), and the pictures on page 110, whilst very pretty will not be happening! I know how to get lighting like that, as will many experienced programmers (lightmaps, shadow volumes, bump-mapping etc...) he gives the impression that these are standard lighting effects for Direct3D, which is a complete lie! Direct3D has no native support for shadows... and the accuracy of the lighting in those images look more like lightmaps than lights... in fact, they almost look like 3D-Studio-Max renders...

As I already touched on, there are some bad practises present here - no mention of triangle culling, vertex types (lit/unlit/untransformed), proper texture sizes, depth buffers and texture formats (D3DFMT_*). There is also very little mention of anything even remotely advanced, you can quite easily design a simple business application or database program using this book - but forget making anything more advanced than that (ie, games). For a relevent metric to base this against, the Direct3D section goes about as far as lesson #4 on this web page - albeit in a different order with somethings added/removed.

It sounds like I'm being very harsh on this book's contents, but maybe it isn't really the author's fault - it probably isn't an option to create a 5 book series for one version of DirectX (given that a new one appears every couple of years), and if you have to cover everything in one book you have to loose much of the added detail to fit it in... But that makes for a rather empty book - compared with the many websites (like this site) that cover this topic to a much greater depth it is a huge shame. There is also quite alot of time wasted (in the DirectXGraphics section) on useless things - amplifying the lack of space. In particular, DirectDraw?? why?? It's not even in DirectX8 - and he later goes on to show how Direct3D8 can do 2D graphics (what DirectDraw did), and second to that, why discuss palettized effects, I dont know of ANY current graphics chips that cant do 16bit or greater - so why do we still need to be covering 8bit modes? (sure, palette animation is cool, but D3D lighting is easier, faster and looks much better).

In Conclusion

I came away from this book feeling a little disappointed - almost everything in here has been done for free on the internet, been done a long time before this book, and in some cases, done considerably better. The only real advantage of this book is that it's a book - and you dont need to be staring at your web-browser to learn stuff...

Good Things Bad Things
• Well structured chapters and sections. • No CD included, not everything is downloadable from the website
• Aimed at general multimedia work • Absolutely no depth to the book - very limited use if you intend to go far with DirectX
• Nice history section • Teaches some bad practises, and skips some very important aspects (eg, enumeration).
• Good explanation of the key terms that it does cover. • Includes a section on DirectDraw - why?
• Includes some VB.Net code • You can get everything covered in this book from a variety of sources online - for free.

 

DirectX 4 VB 2000 Jack Hoxley. All rights reserved.
Reproduction of this site and it's contents, in whole or in part, is prohibited,
except where explicitly stated otherwise.
Design by Mateo
Contact Webmaster