XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone

NAVIGATION - SEARCH

Errata: Chapter 4, Page 57

Hey Chad,


Another minor errata: on page 57, under "Creating a Camera", in the following


"We then need to add a call to InitializeCamera in the beginning of our LoadGraphicsContent method."


LoadGraphicsContent should be replaced with LoadContent.


Cheers,


alvin

alvin - Tuesday, May 5, 2009 @ 9:47 AM

Re: Errata: Chapter 4, Page 57

Yes, you are correct. I'm unsure how that didn't get caught in my search. Thanks for letting me know!


Chad

Chad Carter - Tuesday, May 5, 2009 @ 9:51 AM

Re: Errata: Chapter 4, Page 57

Chad,


There seems to be another error on the Ch. 4 XNADemo code on the CD. The InitializeCamera() method is called by the Initialize() method rather than the LoadContent() method.


I'm enjoying the book so far!


-facto

factotum - Saturday, August 1, 2009 @ 1:55 AM

Re: Errata: Chapter 4, Page 57

Thanks facto, you are right. The code on the CD should have put this in the LoadContent method instead of the Initialize method. Thanks!

Chad Carter - Sunday, August 2, 2009 @ 8:26 AM

Re: Errata: Chapter 4, Page 57

Also, Ch. 5 p. 87 says to cut the call to InitializeCamera() from Initialize() in the game project and paste into Initialize() of the camera class. Since we've determined that InitializeCamera() should have been placed in LoadContent() in the game project, this reference should probably be changed.


However, perhaps InitializeCamera() should have been in Initialize() instead of LoadContent() in the game project in the first place since it isn't graphics content (at least I'm pretty sure it isn't). From there, it would be moved into Initialize() in the camera class. All that would have to be corrected in the text is the reference to LoadGraphicsContent() on p. 57 (should be changed to Initialize()). The CD code would remain unchanged.


What do you think?


Best,


facto

factotum - Sunday, August 2, 2009 @ 3:35 PM

Re: Errata: Chapter 4, Page 57

For the least amount of changes to the book, the original problem with this chapter is that instead of saying to put it in the LoadGraphicsContent method it should be in the Initialize method. The code on the CD is correct and that one sentence in the book is wrong. It really doesn't matter which method (LoadContent or Initialize) it is located though just as long as it is consistent in the program.

Chad Carter - Sunday, August 2, 2009 @ 4:12 PM