******************
The
files for .NET Game Programming with DirectX 9.0 are in Visual Studio 2003
format. We realize that many people haven't yet upgraded (although we obviously
recommend people do so as soon as possible. It is an essentially free upgrade.)
This is actually not a real problem as the
source code files are completely compatible between VS 2002 and 2003 (once of
course DirectX 9 is installed). The problem is that the Visual Studio 2003
Project Files are slightly different from VS 2002 files.
There
are two workarounds. The first, which is pretty much guaranteed to work, is to
simply create a new project in Visual Studio 2002 and add the code files used
for the project manually.
The
second is to manually edit the Visual Studio 2003 project file as follows.
In
the sln file - Change File Version 8.00 to 7.00
In
the vcsproj file - Change ProductVersion 7.10.2215 to 7.0.9466 and Schema
Version 2.0 to 1.0
This is however not supported by Microsoft so we recommend keeping the original CD around for backup.
*******************
1. --------------------------------------------
ISBN : 1590590511
Submitted
by : Bill Graney
Errata: Chapter 1, page 8.
Drawing2D is incorrectly printed as
Drawing2-D twice in the code creating a path
ANSWER: You’re right, although the code on the samples CD is OK, the text in the chapter is wrong. It’ll be fixed on the next edition, thanks!
2.--------------------------------------------
ISBN : 1590590511
Submitted by : Martin Tromblee
Errata: Ch 1, Pg 11
Code example
if rectangle1.x...
should be
if (rectangle1.x...
ANSWER: You’re right. It’ll be fixed on the next edition, thanks!
Also, for
what it is worth, this calculation does not appear to be accurate based on my
understanding.
ANSWER: You’re right again. The correct code is presented in the next listing.
If ((rectangle1.x >= rectangle2.x and rectangle1.x <= rectangle2.x + rectangle2.width) and _
(rectangle1.y >= rectangle2.y and rectangle1.y <= rectangle2.y + rectangle2.height)) _
or _
((rectangle2.x >= rectangle1.x and rectangle2.x <= rectangle1.x + rectangle1.width) and _
(rectangle2.y >= rectangle1.y and rectangle2.y <= rectangle1.y + rectangle1.height) then
'=> The boxes are overlapping
Else
'=> The boxes don't collide!!!
end if
3.-----------------------------------------------
ISBN : 1590590511
Submitted by : Martin Tromblee
Errata: Ch 1, pg 15-16
The three code examples do detect collisions but there appears to be an error which prevents them from being very accurate. The line of code I am refering to is...
If Distance < Object1.width + Object2.width then...
Which I believe should be divided by 2...
If Distance < (Object1.width + Object2.width)/2 then...
ANSWER: You’re right. The correct code is presented in the next listing.
Cathetus1 = math.abs(Object1.CenterX -Object2.CenterX)
Cathetus2 = math.abs(Object1.CenterY -Object2.CenterY)
Distance = math.sqrt(Cathetus1 ^2 +Cathetus2 ^2)
If Distance < (Object1.width + Object2.width)/2 then
'=> The circle objects are overlapping
Else
'=> The circles don't collide!!!
end if
4.--------------------------------------------
ISBN : 1590590511
Submitted
by : Martin Tromblee
Errata: Ch 1, Pg 37
End of type sample code...
objSquare.Draw(...
should be...
objSquare.Show(...
ANSWER: You’re right. The method name is SHOW, and it should be fixed to the next edition, on pages 37 (as you stated) and 36, too. Thanks!
------------------------------