Game not loading, period. [resolved]
by Cosmic Logic · in Torque X 2D · 06/05/2009 (12:20 pm) · 8 replies
I'm just making the switch over from TGB to TX and running in to a bit of a problem and I'm not sure where it is.
I've made a new project file, starter game template, with Game Studio. If I run right away with the regular template settings it works and runs fine. I've gotten rid of the GG logo, added some of my own materials and made an animated sprite on screen. I haven't changed any of the code and now it doesn't run.
By not running I mean it will compile and build fine with no errors, but as soon as the build is done it just stops (the IDE goes back to it's usual look and the debug has stopped). I tried running through a debug using beginRun as a breakpoint. It initializes everything (as far as I'm aware), it even initializes the movementComponent I put on one of the animated sprites. As soon as it's done that though, it stops.
If I try to run from TXB it says "The game executable is out of date and couldn't load all of your game assets. Save your TXB project and rebuild your game in Game Studio to fix this."
I've tried that and nothing.
Any suggestions?
I've made a new project file, starter game template, with Game Studio. If I run right away with the regular template settings it works and runs fine. I've gotten rid of the GG logo, added some of my own materials and made an animated sprite on screen. I haven't changed any of the code and now it doesn't run.
By not running I mean it will compile and build fine with no errors, but as soon as the build is done it just stops (the IDE goes back to it's usual look and the debug has stopped). I tried running through a debug using beginRun as a breakpoint. It initializes everything (as far as I'm aware), it even initializes the movementComponent I put on one of the animated sprites. As soon as it's done that though, it stops.
If I try to run from TXB it says "The game executable is out of date and couldn't load all of your game assets. Save your TXB project and rebuild your game in Game Studio to fix this."
I've tried that and nothing.
Any suggestions?
#2
06/05/2009 (1:01 pm)
Thanks for the tips. I'll try adding stuff one at a time and let you know the outcome and keep this posted.
#3
Thanks, I got that part up and running.
It turns out one of my images was causing the problem like you said.
I'm getting another interesting one now. If I run from Game Studio I get an ArugmentOutOfRangeException was unhandled from the _myGame.Run();
Any ideas? or do you want some more info?
06/05/2009 (3:28 pm)
Hey,Thanks, I got that part up and running.
It turns out one of my images was causing the problem like you said.
I'm getting another interesting one now. If I run from Game Studio I get an ArugmentOutOfRangeException was unhandled from the _myGame.Run();
Any ideas? or do you want some more info?
#4
I usually end up putting a lot of variables into the Watch window so I can see their values while it's running. You can also try using a breakpoint to stop execution some time before it would have gotten to the exception, then step through one line at-a-time, keeping an eye on the Watch window to try to deduce what's going on.
Does the BeginRun() function go through fully?
And does the exception message provide any more details?
06/05/2009 (6:34 pm)
If you run in debug mode from Visual Studio, the exception should stop at a particular line. Look to see what array is being accessed that is going beyond its bounds. If the actual line it stops at is not in a function you necessarily understand, you can try backtracking up the call stack to a function you recognize.I usually end up putting a lot of variables into the Watch window so I can see their values while it's running. You can also try using a breakpoint to stop execution some time before it would have gotten to the exception, then step through one line at-a-time, keeping an eye on the Watch window to try to deduce what's going on.
Does the BeginRun() function go through fully?
And does the exception message provide any more details?
#5
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
What happens is it goes through the BeginRun(), goes through onRegister()'ing all of my components, but once it's done initializing those it hits that exception on the _myGame.Run(); showing that as the top of the call stack.
Does it make a difference that I'm just on a binary version that it doesn't show any deeper? Because I don't actually have access to the source?
06/05/2009 (7:07 pm)
The only extra that it says is:Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
What happens is it goes through the BeginRun(), goes through onRegister()'ing all of my components, but once it's done initializing those it hits that exception on the _myGame.Run(); showing that as the top of the call stack.
Does it make a difference that I'm just on a binary version that it doesn't show any deeper? Because I don't actually have access to the source?
#6
Hate so suggest a brute-force method, but if you're not that far in and are just trying stuff out, you could start fresh. I know you said you already added the images gradually to find there was a bad image, but it could maybe help. Start out with the starter kit as is, make sure it works, then systematically add one thing at-a-time and make sure it still works. That may give some insight.
Good luck.
06/05/2009 (7:28 pm)
That's a little odd. I have the Pro version, so I guess I'm just used to being able to dig into the source code. Tough to say without seeing the project first-hand. Still, it's probably something simple being overlooked...Hate so suggest a brute-force method, but if you're not that far in and are just trying stuff out, you could start fresh. I know you said you already added the images gradually to find there was a bad image, but it could maybe help. Start out with the starter kit as is, make sure it works, then systematically add one thing at-a-time and make sure it still works. That may give some insight.
Good luck.
#7
I found the problem (kind of). I was importing a scene from TGB (I just realised I should have mentioned that right off the bat). I went into the TGB scene, deleted all the text objects, tile layers and removed the triggers as well. I'm not sure which one it was, but it's good to go now.
Thanks a bunch for the help guys, lesson learned :P
EDIT: found the real problem after it came up again, See my other post
TGB scene/project port post for solution
06/05/2009 (8:44 pm)
Hey.I found the problem (kind of). I was importing a scene from TGB (I just realised I should have mentioned that right off the bat). I went into the TGB scene, deleted all the text objects, tile layers and removed the triggers as well. I'm not sure which one it was, but it's good to go now.
Thanks a bunch for the help guys, lesson learned :P
EDIT: found the real problem after it came up again, See my other post
TGB scene/project port post for solution
#8
Any suggestions?
06/09/2009 (6:35 am)
I have this issue too. The game executable is out of date. Tried removing everything from the map I use, like Cosmic Logic did, but still not wanting to work.Any suggestions?
Torque Owner Matthew Hoesterey
Normally you would get an assert if not all your assets are added to the project file in C# but I would check that.
Next I would try removing the things you added one by one (saving a backup first) and see if it starts working. You should be able to find where the problem is located that way.
Also There are some cache files somewhere like .obb or something (don't think that’s the extension) I had to delete these once to get my project to build They are deposited somewhere in your project tree. Sorry about the vague answers I'm at work and don’t have access to any files right now.
Good luck I'll write back if I find more info.