Game Development for Xbox 360, PC + Windows Phone 7

Errata: Chapter 4, Page 57

rated by 0 users
Answered (Verified) This post has 1 verified answer | 5 Replies | 3 Followers

Top 10 Contributor
Male
6 Posts
alvin posted on 5 May 2009 9:47 AM

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

Answered (Verified) Verified Answer

Top 10 Contributor
Male
136 Posts

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

Chad

All Replies

Top 10 Contributor
Male
136 Posts

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

Chad

Top 25 Contributor
2 Posts

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

Top 10 Contributor
Male
136 Posts

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

Top 25 Contributor
2 Posts

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

Top 10 Contributor
Male
136 Posts

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.

Page 1 of 1 (6 items) | RSS
© 2011 Chad Carter. All rights reserved.