Game Development Community

Bug with adding material to TXB

by Matthew Shapiro · in Torque X 2D · 09/15/2007 (4:46 am) · 2 replies

I don't get what I"m doing wrong. I went into mspaint and created a small black square (for use as a background, so I can more easily see white particle effects and such). I saved it as a png image called black.png.

I then went into TXB, opened my project ( a newly created StarterGame project) went to the material builder and imported the image. It showed up as a material fine. I dragged it into the scene, and resized it to fill the camera. All good.

I then save the level and save the project (even got the "your project was updated externally" message from XNA Express) and went back to XNA Game Express. I then ran the game. I now get this assertion every time I try to load the level.

"Error loading XML file: 'data\levels\levelData.txscene', ContentLoadException: 'Error loading "data\images\black". File not found.' If you are using TXB, make sure that you have saved your project, then rebuild your game in Express."

So is this a TX bug or am I doing something wrong? I have repeated this process 5 times and this happens every time. Sure I could ignore it since the background is black by default but I want to know what I"m doing wrong so I don't repeat this for later materials.

*edit* and if anyone cares, I archived the "bad" version of my project in case anyone wants to look at it.

#1
09/26/2007 (3:27 pm)
One question, Did you rebuild the solution in XNA Studio's before you ran the game? You say you went back to XNA and reloaded it but you should rebuild it too.
#2
10/20/2007 (11:12 pm)
Matt (Matthew?), i had the same problem (on a different texture). i have no idea why it happened. But it was fixed by changing the object using that image to use a different image, saving and setting it back. i was going to remove the imagemap from the project and reload it but didn't end up needing to

It seems like a bug to me since i've been following the tutorial and haven't written enough code to be able to mistype or screw anything up yet

If anyone monitors this forum for potential bugs and wants details about how i did this, i posted them here: http://garagegames.com/mg/forums/result.thread.php?qt=68454. Short version - the problem only happened to the first image i dragged into the project. The generated code/XML in the project and level file are significantly different than the other images i dragged in. i haven't tried recreating the problem