Feb 23, 2011 at 2:59 PM
Edited Feb 23, 2011 at 3:37 PM
Ok, here's what I did to fix it:
1) Within the properties grid of content file "Map01.tide", I set the Content Importer and Content Processor properties respectively to "tIDE Map Importer" and "tIDE Map Processor". These are usually set automatically but for some reaosn where blank.
2) Within the properties grid of content files "Background01.png", "Background02.png", "Background03.png" and "TileSheet01.png", I set the Build Action property to None since, in XNA 4.0, this causes a conflict with the tIDE Map Processor which also processes
these image files to XNBs. I din't think this was an issue in XNA 3.1. I should update the tutorial to reflect this.
3) Unlike XNA 3.1, XNA 4.0 is very stringent on the Viewport (clipping) region not being larger than the display device's dimensions and causes a crash when this is set to 800 x 600 pixels as in the tutorial. I replaced the line
viewport = new xTile.Dimensions.Rectangle(new Size(800, 600));
viewport = new xTile.Dimensions.Rectangle(new Size(graphics.PreferredBackBufferWidth, graphics.PreferredBackBufferHeight));
I think I will handle this issue internally within the engine by clipping the specified clipping region itself to the display's dimensions. This should hopefully avoid breaking old code.