XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone

NAVIGATION - SEARCH

Flaws in Chapter 3

There seem some flaws that I found while perusing this chapter. First off, while working on the XNAPerfStarter, it tells you to call all methods for JIT-ing, but it doesn't in the book; it leaves of the following methods:


IntializeTransformWithPreDetermineAspectRatio()


RotateWithoutMod()


RotateWithMod()


RotateElseIf()


*is there a specific reason for leaving these off?


Additionally, when I try to run the program, after referencing XNAPerformanceChecker, and compiling the same Windows Game Library Project, if get the following error:


----------------------------------------------------------------------------------------------------------------------------------------


Unhandled Exception: System.BadImageFormatException: Could not load file or assembly 'XNAPerformanceChecker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'XNAPerformanceChecker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
   at XNAPerfStarter.Program.Main(String[] args)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


----------------------------------------------------------------------------------------------------------------------------------------


*What did I do wrong?


Could someone tell me? I have no idea what to do. I'm new to XNA.


Thanks a lot!


AirStyle120 - Wednesday, June 23, 2010 @ 1:09 PM

Re: Flaws in Chapter 3

AirStyle120,


I've not tried any of the orignal XNA Game Studio 1.0 code from the original book with the latest assemblies.  You may want to try to right click the solution inside of the IDE and select Clean Build and the Rebuild all.  It seems like a reference isn't set correctly.  You can download the v2.0 updated code from this site which should have all of the references set correctly.


And for the first question there were some items of code that were left out of the book but should have been there.  The key to having the code up front in this example was to try and get true time costs of those particular methods.


Hopes this helps,


Chad

Chad Carter - Monday, June 28, 2010 @ 12:53 PM