Game Development Community

XboX 360 Deployment Bugs (Solved)

by Matthew · in Torque X 2D · 08/17/2009 (8:15 pm) · 4 replies

I've read a few forums that suggest that the XboX 360 is not NEARLY as forgiving as the PC. This is most certainly true and I have a couple of bugs I'd like help on. Again, the game works fine on the PC.

1.I attach a T2DFadeoutComponent on a fireball template so that after traveling for 4 seconds, it fades away and disappears. If I do this, when I hit the "fire" button on the XboX, the game crashes with the error message "No source code can be found for the current location." If I remove the component, it works fine.

2.I can play the game through fine once. If I lose, I have it set to take the user back to the title screen. After the "story" screen, the level should load. On the second playthrough, this crashes the game with a "Framework.dll" error saying that "The resource cannot be created." The "resource" it is speaking of is always a wavebank in a given scene object, but not always the same object, but ALWAYS a waveBank problem.

I'm guessing the second error is my fault. I had some problems with properly resetting the game upon a second playthrough so above the "SceneLoader.Load(@"datalevelslevelData.txscene");" line in Game.cs, I call "SceneLoader.UnloadLastScene();". This adequately reset the scene for another playthrough. I'm guessing what it also does is let go of all the scene's resources, therby creating a need to re-register everything, including the individual wavebank variables. Again, on the PC version, everything's fine. Is there a better way/should I "reset" the game differently or is this an XboX deployment bug?

#1
08/17/2009 (11:14 pm)
Hi Matthew,

I'm afraid that most folks here, including me are going to be unlikely to help you. Basically, you are asking "how do I debug this problem with the Xbox?"

My answer would be: I would crank up my debugger and wait for the error to occur. Then, I'd have source code and I'd be able to see what went wrong. Unfortunately, I can tell that you don't have the source, so you won't have this option.

You have several choices:
1. Log more and look at the logs when errors occur. (free)
2. Play the game with the debugger attached and when the error occurs, use the Call Stack window to see if down the stack the offending problem originated in your code. If you are hitting an error caused by your code, it's probably easy to fix. (free)
3. Purchase the source code for the engine and debug as I suggested above. $150 is a LOT of money, but only if you don't value your time. Options 1 & 2, while free will cost you a lot of time. Option 3 will help you solve these problems very quickly.

Your call. :-)
#2
08/20/2009 (12:36 am)
Ok, so I fixed one of the issues. Wave banks should only be initialized ONCE per game. I do have to initialize the sound banks in each file that uses a cue, but NOT the wave bank. It also makes the game load a LOT faster on the XboX. As far as the fade out problem, I'm still looking into it.
#3
08/20/2009 (8:07 am)
Hey Matthew,

For your first issue, you might want to take a look at this thread: http://www.garagegames.com/community/forums/viewthread/95693
#4
08/20/2009 (1:12 pm)
When it crashes, the error tells me that the T2DFadeoutComponent must be attached to a 2D sceneobject with a material. It is but I think the problem is that this object is a template that is later cloned. It's the clones that need to fade out. Maybe the clones don't nessecarily have the same properties as the original.

I worked around it. I used John K.'s WeaponComponent and after it duplicates a fireball and registers it in the object DB, I AddTickCallbacks and check the distance from the player. If it gets too far, I just kill it so it doesn't travel all the way across the map to it's inevitable world boundary. All I wanted to do was kill it in a reasonable time frame and I accomplished that so no big deal.