urgent - game cuts off after playing for at least 15 mins

FirstDanFirstDan Member Posts: 208
edited December 2012 in Working with GS (Mac)
can some help pls on iphone 5
«1

Comments

  • BoyGeniusStudiosBoyGeniusStudios Member Posts: 92
    How does it cut off?
  • FirstDanFirstDan Member Posts: 208
    the app turns off just looking at the ram usuage

    images 1.1 mb
    sounds 16.5mb
    game engine 30.8 mb
    other 23.2 mb
    total 71.6 mb

    this is level 1 off my game

    can some please help me whats goin ?
  • FirstDanFirstDan Member Posts: 208
    @jonmulcahy - interesting can u elaborate ? my ram usage exceeds to 90 mb, would this be the cause?
  • FirstDanFirstDan Member Posts: 208
    I am very desperate for help, see, im sending my game off to apple tmrw but this issue
    has killed all hope :(
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    You need to go into extreme detail about what is going on. Based on what you have posted no one is going to be able to help you. Post a video of the crash happening. Describe what happens when it crashes, and what sort of logic is happening when it crashes. Is it crashing on something that has run before or is it the first time it launches. Does it always crash at the same time? The more information the better.
  • FirstDanFirstDan Member Posts: 208
    @jonmulcahy - ok, so ive been working on game that is one 1 scene, so i am destroying and spawning quite abit, i have adhoc builds that i have been testing, i have just cooked my lastest build, i have amended a few rules, but nothing major, im sorry i cant give out more information as thats all i have...everytime i get to level 13-14 its crashes...im trying again but it takes around 15 mins to get to that point
  • FirstDanFirstDan Member Posts: 208
    I have just tried on my 3GS!! It seems to crash at the same level, this is about 15 minutes worth of play... Possible out of memory crash? Any solutions guys.. Need you !!! Anyone, everyone, greatly appreciative
  • LooseMooseLooseMoose Member Posts: 224
    Does anything happen at the 15 minute mark that hasn't already been happening earlier? e.g Boss spawn?

    You may have to recycle you actors as opposed to destroying/spawning. This will put less strain on your game and could fix your crash problem
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    100MB is too high on an iPhone 3g, but should be fine on an iPhone5.

    i don't think you have a memory issue, i think it's a code issue. You're going to have to narrow down what is happening when it crashes and look at that code
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I agree with @johnmulchay somewhere in that scene you have a code issue review the code that relates to that scene. Clearly you have a code conflict.
  • FirstDanFirstDan Member Posts: 208
    im glad its a code conflict but i can't seem to find it,
  • FirstDanFirstDan Member Posts: 208
    I've been Searching hard and I can't find any issue with my code!! Can anyone give me an example of rule conflicts... I am going insane!! When I play from level 1 to 16, it crashes on level 13, or, 14 or 15, When jumping through each of these levels it works very confusing
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598

    @FirstDan

    OK, see if we can narrow it down a bit more : when it crashes, is it at the beginning, randomly in middle of gameplay, or end of a level, just before its meant to go to the next level??

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FirstDanFirstDan Member Posts: 208
    @gyroscope - thanks for your response, ill let you know exactly, but usually happens at the start of lvel 15, but then it happens at the start of level 13 confusing, please keep your eye out on this discussion as i will post more details once i get to level 15 as i keep getting killed lol
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited December 2012

    Hi, I'll keep an eye on this thread then! But for now, another question: in the Rules where the Change Scene behaviour is, in level 12 or 14, are there any Timers before or after; or specifically any other behaviours after the change scene behaviour? Also, any Interpolate behaviours still running its course when the Change Scene behaviour kicks in?

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FirstDanFirstDan Member Posts: 208
    @gyroscope- you are awesome for your help, I'm ever so greatfull

    My whole game is on 1 scene!! But I do have an enemy actor that interpolates in and out of the scene and attacks, when the player gets past a certain point, I change the enemy that is interpolating ,, back to its start x and y....

    I have another actor which acts as an bonus that carries the player from 1 location to another!! I have an timer: after 9 seconds destroy bonus!!

    I'm gutted because I think I have an really brill game!!!

    Thanks gyro!!



  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited December 2012

    You're welcome! OK, without seeing our Rules – and now I understand that you've all your levels on one scene, there's the possibility that some timer or interpolate behaviour is still running when you change to the next scene... whatever method you're using for the next scene, make sure you change only when any timer or interpolate has "done its job".

    Hope that sorts it for you....

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FirstDanFirstDan Member Posts: 208
    @gyroscope - I took your advice and eliminated and enhanced various code functions to ensure that interpolates and timers run to their course. The problem still remains! It seems like I start at level 1 and it will crash at level 9. If I jump from level 9 it crashes on level 18...

    I don't know, if its a coincidence that it crashes every 9 levels! But the last time it crashed I was on level 18. My enemy actor started its interpolate but it ran its course

    Very confused
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited December 2012

    Well I'm not sure now.... are you using many spawns? As far as I know, these aren't still very good once destroyed go cleaning out the RAM, so maybe the memory is building up until it crashes....

    By the way, in reference to your game all in one level, personally, I wouldn't do that unless it's something like a word game or puzzle game, where it's the same layout and gameplay, and same amount of actors, just changing orders, etc every scene. Maybe your game might have been better in separate scenes.... but I guess that's too late to say now...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • FirstDanFirstDan Member Posts: 208
    edited December 2012
    @Gyroscope-It's a doodle jump type game with a twist, it's my first game and I have learnt a lot, I do have a timer that counts the duration of a track, and once it reaches a certain number I change the track, this is in the main menu screen!! Maybe I should turn that off before hitting play!

    For the platforms to jump upon I am constantly spawning them and when they hit the bottom I'm destroying them and spawning from the top again! I tried to recycle thus element but I couldn't get it right and in sync
  • FirstDanFirstDan Member Posts: 208
    @gyroscope- do u think by recycling the platforms- memory issue should go away? I am using recycling in my game where possible!!

    I need an gamesalad angel to rescue me lol
  • FirstDanFirstDan Member Posts: 208
    Still getting crashes, even though I have recycled all elements, optimised my code to prevent code conflictS, made sure all my interpolates and timers run their course!!

    Compressed audio, optimised images,

    Still getting a crash !!!
  • SocksSocks London, UK.Member Posts: 12,822
    @FirstDan

    You really are going to have to bite the bullet and give people much more detail, produce screen shots of your code, a video of where things go wrong and so on - so far people have little to go on.

    Without details I can only join in the others in saying 'it's probably a memory or code problem' (which is shorthand for 'I haven't got a clue').

    One thing you can try is to strip out as much extraneous information as you can, dump the audio, dump the backgrounds, dump the score count, dump the particle explosions (and so on) . . . . do these one at a time until the problem disappears and this should give you an idea of where the issues might be.
  • OniCraftOniCraft Member, BASIC Posts: 43
    edited December 2012
    maybe add a test button so that once you press it you can skip that crashing level. You should check if your game will continue to run fine as long as you skip level 15. If it runs fine, then maybe the problem is within whatever's happening in level 15 and not really a memory or a global thing.
  • FirstDanFirstDan Member Posts: 208
    @people - It's hard to understand what to post, after all my optimisation, the game now stops at level 14, before it was crashing on level 8 or 12, but when I skip to say level 14 it will work fine, the issue can be anywhere, can there something in the XML files that's not showing up in gamesalad?

    Dan - frustrated
  • OniCraftOniCraft Member, BASIC Posts: 43
    What if you make some sort of a "break" every 5 levels to refresh things (change scene instead of all in one scene)?
  • FirstDanFirstDan Member Posts: 208
    Hmmm, yes I can try!! Onicraft - I get an exception error basically saying that something is deleted but gamesalad or Xcode thinks it valid and its trying to accessit? However I have requested support from gamesalad
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yep that XML file corruption. This happens when deleting and adding lots of stuff. This is why I prototype my stuff in little projects until the code is right then after I work it all out I build my final project. Keeps the file fresh and void of XML issues.
  • FirstDanFirstDan Member Posts: 208
    @fsb, how can I detect what XML file it is, what action can I take to fix it?
Sign In or Register to comment.