Game crashed with spawn & destroy behaviors, so I replaced them with recycles...

SinequanonSinequanon Member Posts: 35
edited November -1 in Tech Support
...and it still crashes. I used to have behaviors which were spawning new bullets every time something was shooting, and in replaced them with recycling actors. I also pre-generated any power ups. Prior to this, the app was crashing after spawning between 25 and 30 power ups during gameplay. The tweaks I've made have improved the game's memory footprint by 10 mb, and the game now runs (and crashes at) 60 fps. The last crash had the memory at only 40 mb on an iPad 2. Are there any other common reasons a game would simply crash out during gameplay other than memory? Or any other hidden processes that are memory intensive (I am using a decent amount of interpolated and writing to game/global attributes)?

Comments

  • ChaserChaser Member Posts: 1,453
    Behaviors and attributes with missing tags and such. Example in my current game GS erased part of my collide in my actor wall "collide with actor with tag ______"
  • SinequanonSinequanon Member Posts: 35
    Is there a fast way to search through the XML files for something like that? (a particular string, I mean)

    I was monitoring the iPad's console in Xcode when it was spawning and destroying, and the crash log definitely indicated that the program ran out of memory, though I haven't tried the same since replacing the behaviors. I will now proceed to scour my actors. Fun time. ;)
  • SinequanonSinequanon Member Posts: 35
    Sorry to double-post, but I've got the game running right now and just idling. It has idled for longer than it ever runs if you're actually playing the game (it's been idle for about 5 minutes now).

    The way it is built, there should be no difference between the game idling and the game in action in terms of new objects being created. All of the bullets and powerups have been spawned and are sitting off in a gutter at 800, 800 (this is an iPad game), waiting to be called. If I try and shoot a bit, it works fine.

    The only thing there is to do now are to destroy bricks with your bullets. Doing so causes a brick to move off-screen for a random time and then to reappear at its location. Once I began doing that, with the game that had been idling peacefully for 5 minutes, it crashed. So I'm going to check out the attributes for the bricks...
  • SEEdsSEEds Member Posts: 2
    s
  • SinequanonSinequanon Member Posts: 35
    Could this be caused by a casting issue? I have a variable stored on bullets and such that is the location they go when they're not "alive". Basically I have:

    When <this> Collides with object of tag Wall
    Change Attribute self.position.X (real) to self.gutter (int)
    Change Attribute self.position.Y (real) to self.gutter (int)

    Or is this not an issue in GS?
Sign In or Register to comment.