Game Development Community

debug methods

by Zeinad · in iTorque 2D · 06/29/2009 (8:33 am) · 2 replies

I have a bug in my game right now that I cant seem to find the source of. In an attempt to optimize I was trying to switch enemy spawning from creating a new enemy to moving one in from off screen, and killing them will move them off screen instead of deleting them. However, if I don't have the enemy deleted ondeath then my game crashes and I am having trouble finding the cause, there seem to be no script errors. I tried turning trace on as well and don't see anything unusual there either.

Are there any other methods I don't know of that I could use to try and figure out the source of the problem?

Thanks.

#1
06/29/2009 (8:53 am)
Just run the game from within XCode in debug and if it crashes it will halt the program where it crashes, allowing you to follow the call trace to see where it went wrong.
#2
06/30/2009 (6:57 am)
For scripting this doesn't help a lot unless your an expert in how the scripting engine works. This is one of the primary reason I prefer to do all c++ code, because debugging script is extremely time consuming.