[T2Di 1.3]Stopped loading levels...I need help!
by Daniel Hopkins · in iTorque 2D · 01/15/2010 (8:16 pm) · 3 replies
Alright, so my game was working correctly on the computer as well as the device. I have a menu that has a list of buttons. When you click on one, it loads a new level. As I said, everything worked fine. I then decided to do some more editing of the load up image and app icon. After doing this I backed everything up.
I then went on to adding sound to my game. After testing it through the editor (everything worked fine), I compiled it for my device. The sound worked just fine, but the levels were no longer loading. A quick check in the console shows no error message of any kind--as well as the lack of the loading level message. I then went about testing/tweaking/editing/removing until I was right back where I started from. After failing to get it to load my levels, I just decided to go back to my backed up version (which, as you remember, had nothing changed from the previous working version other than the icon and load up image). To my dismay, it still refused to load the levels!
Here is the code I'm using to load a level:
sceneWindow2D.schedule("1","loadLevel", "game/data/levels/bugeratorMenu.t2d" );
I know the function in which the above line is found is being called, as I can see the echo statement I made for that function in the console (or device debugger). I also know that line is being called because when I change it to this:
sceneWindow2D.loadLevel("game/data/levels/bugeratorMenu.t2d" );
it crashes on both my computer and the device (with a EXC_BAD_ACCESS error in the device debugger). So, again, when I change the former line to the latter, absolutely NOTHING appears in the debugger in regards to loading a level, despite the fact that it works fine when played from the editor--and worked fine on my device until now. It's almost as if the "schedule" function is failing to call the "loadLevel" function.
At this point, I'm just completely wiped out. I've spent the last three hours tweaking and recompiling..all to see if I could fix something that was never broken. The real kicker is I was almost done with it and ready to submit it for review. Now I have know idea what to do....
I cannot express to you how greatly I would appreciate it if someone could shed some light as to what would cause it to all of a sudden refuse to load a new level.
I then went on to adding sound to my game. After testing it through the editor (everything worked fine), I compiled it for my device. The sound worked just fine, but the levels were no longer loading. A quick check in the console shows no error message of any kind--as well as the lack of the loading level message. I then went about testing/tweaking/editing/removing until I was right back where I started from. After failing to get it to load my levels, I just decided to go back to my backed up version (which, as you remember, had nothing changed from the previous working version other than the icon and load up image). To my dismay, it still refused to load the levels!
Here is the code I'm using to load a level:
sceneWindow2D.schedule("1","loadLevel", "game/data/levels/bugeratorMenu.t2d" );
I know the function in which the above line is found is being called, as I can see the echo statement I made for that function in the console (or device debugger). I also know that line is being called because when I change it to this:
sceneWindow2D.loadLevel("game/data/levels/bugeratorMenu.t2d" );
it crashes on both my computer and the device (with a EXC_BAD_ACCESS error in the device debugger). So, again, when I change the former line to the latter, absolutely NOTHING appears in the debugger in regards to loading a level, despite the fact that it works fine when played from the editor--and worked fine on my device until now. It's almost as if the "schedule" function is failing to call the "loadLevel" function.
At this point, I'm just completely wiped out. I've spent the last three hours tweaking and recompiling..all to see if I could fix something that was never broken. The real kicker is I was almost done with it and ready to submit it for review. Now I have know idea what to do....
I cannot express to you how greatly I would appreciate it if someone could shed some light as to what would cause it to all of a sudden refuse to load a new level.
#2
01/16/2010 (12:50 am)
Man, I tell you what, this is driving me crazy. I decided to create a new project and port the code that was originally working over to it, with the thought that maybe I had inadvertently changed some of the project settings--no go. I then rebuilt the menu from scratch--no go. I then removed the app from my device (which I had done before) and turned it off, and then back on. After a recompile of the exact same project and code--everything works. Now it's got me scared to do anything else, lest I should send it back into whatever crazy mode it was in. I sure wish I could figure out why it did that...
#3
01/18/2010 (6:15 pm)
Go into the Xcode's organizer and see the crash log for the game. It will probably show you the problem. I suspect an issue with memory.
Torque 3D Owner Daniel Hopkins
Default Studio Name