Biffo, you should definitely integrate with Director sooner than later for this precise reason - you can check it along the way. IMHO it’s much harder to put your code into Director after the fact, than right out of the gate. You are doing exactly what you need to be doing. As for getting more debugging results you can still run your app via the Corona Terminal and spit out anything you want using print statements…
Like this:
print("Something meaningful to your debugging efforts, variable values, line numbers, whatever")
You can sprinkle those in anywhere to help with debugging and view in the Terminal window as you are running and debugging.
I’m also rolling an app into 1.3 tonight, the new version is looking great. Ricardo did a great job!
Some other tips that will keep you from punching the screen…
-
Remember to have images you are using in your project folder, it’s easy to get going copying and pasting and not have resources that are needed to load
-
Remember to get ALL your display objects into that localGroup
-
Read the second bullet again
-
Don’t be afraid to modify and/or add print statements into the Director.lua file to help paint the picture of what is going on, Ricardo will probably be thrilled you are in there and besides you can always get back to the original easy enough if you crash the universe
Good luck! I’m in there too!
One thing I added into my Director.lua file for some development stages was this function…
local function ShowDetails()
-- print memory usage
local memUsage\_str = string.format( "memUsage = %.3f KB", collectgarbage( "count" ) )
print( memUsage\_str )
local texMemUsage\_str = string.format( "texMemUsage = %.3f KB", system.getInfo( "textureMemoryUsed" ) )
print( texMemUsage\_str )
end
I call it like this inside the director:changeScene, right after the isChangingScene evaluation:
print("Before Scene Change - Director")
ShowDetails()
And once again like this in the last lines of executionof the director:changeScene
print("After Scene Change - Director")
ShowDetails()
Then I just watch the terminal as I keep adding stuff to my Scenes to see how bloated the texture map and memory usage gets - it kind of creates a todo list for me of things to optimize so to speak.
Hope any of that is helpful…
–Croisened [import]uid: 48203 topic_id: 12073 reply_id: 43989[/import]