OhNoes! UFOs!

forkliftforklift Member Posts: 386
edited November -1 in Announce Your Game!
My game is 100% completed, but I can not publish it. I develop in my spare time and this was my first project in GameSalad. I don't own an idevice, but my father does, so I was confident that I could test and become a developer. 3 months later, my game is finished and is flawless in the simulator. I register as a dev and travel a long way to my father's house. After getting it on the ipad, the game crashes at random intervals. I suspect the cause is the giant memory leak in gamesalad. I can't stress how disappointed and hurt I am right now.

I had heard stories of other people having to shelf a game when they spawn and destroy actors, but somehow I felt that working on the ipad would change that outcome. We were also told by gamesalad that they had 'improved' the leak. Well, now I'm out a lot of money, time, and have no game to show for it. I'm beyond words right now.

*edit* I will show pictures and video of the final version of this game (taken from the simulator) and post them here, in the hopes that if gamesalad ever fixes their horrible problem, that I will have an awesome game ready to go.

And no, gamesalad, I do not accept that somehow it's apple's fault for the memory leak.
«1

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Can you try making a version with all of the images and audio removed and see if it still crashes. If so, then it may be you logic that is a problem as well.
  • simo103simo103 Member, PRO Posts: 1,331
    hey I know you are disappointed right now BUT it might be possible the issue is something else and may not be that hard to fix. Possibly the ram use might be too high at parts in your game and a slimming of the graphic sizes or a few re-writes of some of your spawn behaviours and you might be all good.

    Can you post a few screen shots of your app running so we can see the memory use and images/files sizes? That might help us help you!
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Thats why it is so important to use the viewer during development, the memory usage is invaluable.
  • forkliftforklift Member Posts: 386
    There is a ton of stuff going on in the game: at least 100 25x25 blocks that simulate physics, and a metric crap load of missiles and lasers that spawn and destroy.

    How do you show memory use and such?
  • quantumsheepquantumsheep Member Posts: 8,188
    Dude, I am so sorry. I was really looking forward to this.

    If I had an iPad I'd offer to take a look at it and help out - that's how much I liked what you were doing!

    Hopefully someone else might be able to take a look and point you in the right direction.

    Cheers, and best wishes,

    QS

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • simo103simo103 Member, PRO Posts: 1,331
    when you run the GS viewer that allows you to view it on your device ... the viewer on your computer shows memory use etc as you move through your game.

    Likely that number of actors, spawns etc is your problem but there are some workarounds depending on your game play .. for example instead of spawning/destroying you can move them in and out of the scene to the same effect but it cuts down the spawn/destroys.
  • simo103simo103 Member, PRO Posts: 1,331
    Also what BarkBarkCo says is a good way to start as you quickly can isolate the main problem between logic and assets.
  • forkliftforklift Member Posts: 386
    Thanks, QS. I won't give up on it, and when I get back into my father's city, i'll load a new version and try to debug what's going on.

    My reservations on it being bad code, is that i can play level 1 on easy and still have the problem of random crash when lasers start taking out lots of stuff. Lvl 1 on easy only has a few enemies (and they all spawn without problem) and new music doesn't start up or new images don't load, etc.
  • forkliftforklift Member Posts: 386
    simo103, therein lies the problem. As stated, I am not on my computer when testing this game since I don't have an idevice. If I plug my dad's ipad into my computer and test, it will wipe his files. We can thank apple for that.

    I basically take him the app itself and drag it into itunes, then sync from his computer.
  • simo103simo103 Member, PRO Posts: 1,331
    well I'm pretty sure we can blame illegal file sharers for the issues that Apple has implemented after all they probably don't care too much how people got their music/videos/apps as they make money selling the equipment but as a content creator I (and you) should be happy they have some protection and they won't get permission to sell music without it .. but anyway that's a different topic.

    Re: the GS viewer .. I believe I recall someone saying they got an xcode simulator working for GS and I think that gives you performance info ?!?!? not sure .. can anyone else who has this knowledge weigh-in?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    100 blocks with physics and a ton of missiles and lasers spawning are going to be the problem, its just too much for gs to handle. Search back for memory crashes and you'll see post after post about it.

    Instead of spawning and destroying, you should try just moving the actors on and off screen. Try to reduce the number of blocks on screen, make sure your audio is 8bit mono and reduce the bit depth of your png images.

    Anything that is not moving in the game, make sure you uncheck moveable under the actors physics section. If it's invisible or a spawner, uncheck visible under graphics

    That will help eith memory usage, but you might have to tone down the number of actors on screen at once. Pre 3GS, you really couldn't have more than 50 moving actors on screen at once without problems
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Actually, If you want to email me the project file, I'll load it up in my viewer and send you some screenshots of the memory usage, that should help you identify the problem.
  • forkliftforklift Member Posts: 386
    jonmulcahy said:
    100 blocks with physics and a ton of missiles and lasers spawning are going to be the problem, its just too much for gs to handle.
    Well, let that be a lesson for everyone not to use this program for anything more awesome than a tap clone. This is such a shame. If I had paid for gamesalad, I would be irate. Thankfully, I did not and now I know that I should only make uber tiny games with nothing cool happening in them.
  • quantumsheepquantumsheep Member Posts: 8,188
    forklift said:
    Well, let that be a lesson for everyone not to use this program for anything more awesome than a tap clone... now I know that I should only make uber tiny games with nothing cool happening in them.

    I'm on your side. I'm sorry your game is crashing. But this is just not accurate.

    Take a look at some of the games mentioned here:

    http://gamesalad.com/forums/topic.php?id=15199

    Not a tap clone amongst them I think you'll find.

    Take a break and come back to it tomorrow, paying special attention to what Jonnulcahy's said. He's even offered to help you try and pinpoint where the bottlenecks are.

    I understand your frustration, I really do. But chin up, and see what it looks like in the morning, eh?

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • forkliftforklift Member Posts: 386
    QS: Thanks for the pep-talk, and of course, I was angry when I posted about nothing cool happening in our programs. I regret that statement, but I'm not prepared to water down my game. If I begin taking out or replacing the aspects that bog down GS, it's just not the same game anymore. It's like a film maker saying "Ok, that Avatar movie is great... but can you do it with scale models and claymation?"
  • 8BitMichael8BitMichael Member, PRO Posts: 125
    forklift said:
    QS: Thanks for the pep-talk, and of course, I was angry when I posted about nothing cool happening in our programs. I regret that statement, but I'm not prepared to water down my game. If I begin taking out or replacing the aspects that bog down GS, it's just not the same game anymore. It's like a film maker saying "Ok, that Avatar movie is great... but can you do it with scale models and claymation?"

    Optimizing your game so it doesn't crash is not the same as removing features. There are many techniques you can use to isolate and solve your problems, none of which I'm qualified to talk about, but BarkBarkCo posted some good suggestions. Also, not to harp, but testing your game on a device during development is critical and prevents situations like these.
  • forkliftforklift Member Posts: 386
    MDD & some people just aren't getting it. I appreciate their input, but I've gone through a ton of optimization at multiple stages of development: I've reduced image sizes, toned down particle effects, lowered sound quality, etc.. What I have is a complicated game, that's all. I can't optimize it any more without taking out features. In my mind, it's not simply a case of moving characters off-screen when they die. So yes, it is the same as removing features.

    Just wanted to share my frustration and perhaps spare others from the same. Yeah, I know I should have tested the game on a device... but hey, if you had really paid attention, you'd know I couldn't have done that because I don't OWN one. Thanks for rubbing it in lol.

    Poor man's hobby turned nightmare.

    I have no idea if releasing this for web browser play will work or if it will crash, too. I'm not sure how it's all handled. Though, I'm guessing it will still crash.
  • 8BitMichael8BitMichael Member, PRO Posts: 125
    @forklift

    Sorry you feel that way. The thing is, it probably CAN be fixed (and honestly, maybe you WILL end up having to remove features, but that's just part of the development process). And I was paying attention, I know you don't have an iDevice, but that doesn't detract from how critical testing is.

    Anyways, I know it's frustrating. Good luck!
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    Moving characters off screen instead of spawning/destroying WILL make a marked improvement on your memory usage. There is a known bug in GS where memory is not getting released when an object is destroyed, so eventually, no matter how simple your game, spawning/destroying will cause it to fill up available memory and crash.

    Now obviously if you are just spawning a square and destroying it every second, it will take days, but with the amount of spawn/destroy you say you are using, it's probably eating it up pretty quick
  • forkliftforklift Member Posts: 386
    Here's just a small taste of what goes on in the game. Out of 6 levels, these first 3 have maybe half the number of building blocks of the latter 3. The harder the difficulty, more enemies appear. All levels played on medium difficulty.

    Lvl 1


    Lvl 2


    Lvl 3
  • forkliftforklift Member Posts: 386
    So, QS... in your game 'Attack of the Krakken', did you use the method of keeping actors just off screen until they're needed or do you constantly spawn and destroy your lasers, enemies, etc.?
  • MotherHooseMotherHoose Member Posts: 2,456
    forklift said:... And no, gamesalad, I do not accept that somehow it's apple's fault for the memory leak.

    ah... if the iPad is iOS4, the multitasking could be causing random crashes... it does on mine if a lot of stuff is running in the bg... things that never crashed before!

    This is so sad @forklift.... ;( the game looks exquisite... the graphic style is fantastic... the play looks great.

    you seem to have worked hard to minimize the resource intensity...

    +Suggestions...
    separate the buildings from the sky.... into two images
    have the sky image very small.... 16x16 and when on scene changeAttribute width and height to Display size
    have the building image show in a placeholder ...
    when scene = (well I use an Index Attribute for this) changeImage To:.... Otherwise: when sceneIndex = 0 changeImage To: clear.png for each of those images

    I know the editor doesn't have much blank space around the iPad layout.... but easy to set the x or y attribute to a minus #... or you could do a plus screenHeight/screenWidth change.

    Perhaps you could work up as a desktop version... and sell on the new AppleStore... yuck that's another $99... but I feel that you will recoup your expenses with this good game!

    don't give up... you have done a beautiful job!... and you will overcome those obstacles!

    MH
  • quantumsheepquantumsheep Member Posts: 8,188
    forklift said:
    So, QS... in your game 'Attack of the Krakken', did you use the method of keeping actors just off screen until they're needed or do you constantly spawn and destroy your lasers, enemies, etc.?

    I tried to be clever about it, but it didn't really work!

    All enemies are onscreen from the start. However, a huge amount of constraints are used so it slows things down.

    Bullets are spawned - as are explosions and then point indicators.

    It just suited the way I was working to do it like that, but I was aware pretty early on that it wouldn't run on older devices as I could test it with the GS Viewer.

    There are still things I can improve on it, performance wise. I did a little tweaking for the update, but it could still do with a bit more.

    The HUD, for example. The Radar outline, 'score' 'shields' and 'lives' text could all be one image, on one actor, instead of four actors with separate images on them.

    The Kraken themselves have separate shadows that need constraining to individual enemies. These could be built into the graphics instead, saving me at least five actors and 10 constraints per level.

    I'm working on a game using the same 'engine', and hope that I'll be able to make it run faster (despite more stuff going on!).

    I'm finishing off Disco Farm, which was built on the back of Gravitrixx. Gravitrixx is incredibly optimised. It runs fine on all devices and has 100 levels in it!

    At the same time, I'm working on a run and gun game. I love this genre on the iPhone, and have wanted to do one for aaaages.

    It's probably my most optimised game yet. There are only four scenes in it, for example. The menu system has everything on one scene (except achievements if they go in- they'll go in a separate screen) and you just change the camera origin to go to the area you want to (as with Gravitrixx).

    The actual gameplay screen is more optimised than that on Gravitrixx. On Gravitrixx, all the actors needed were all in the scene. There are a couple of spawns where we wanted to add something, but not have to trawl through 100 levels to put it in.

    So, in the runner game, the scene is double the height it needs to be. When you die, the camera origin is changed to go to the area above where all the game stats /retry/go to menu buttons are. It's pretty efficient.

    Every game you make you'll learn little tricks like these. Seriously. I've been using GameSalad for almost two years now, and I'm *still* learning stuff all the time!

    I would certainly listen to Motherhoose. I know, as he mentions, it's another $100 to publish to the Mac App store, and a lot of hassle with certificates and whatnot.

    BUT

    If GS *does* end up giving us this option (and why not, eh? You can already make Mac Games with GS) then it may be a way of recouping some of the time and effort that's obviously gone into your game.

    GS will improve, performance wise, over time. Perhaps releasing to the Mac Store, seeing how the game does, then releasing an iPad version when GS *and* you are ready, would be the way to go?

    I'd certainly buy your game on the Mac Store - right up my street! I would sadly miss out on it currently if it was iPad only!

    Hope that helps!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • forkliftforklift Member Posts: 386
    MotherHoose,

    Currently, my BG images are 1024x768 and stretched to 2048x768, with the buildings being their own separate images on different layers.

    I'm not sure what you mean by using a placeholder, though.

    QS & MotherHoose:

    I have thought about doing a mac store release, but wouldn't I run into the same problems of it crashing randomly? That is, if I don't change anything, would it suddenly become stable on the Mac platform?

    QS: Thanks for taking the time to type all that to me. Your ideas are certainly welcome and I hadn't though of increasing scene size and changing camera origin to cut down on a lot of extra weight.

    On a different note:

    Last night I started remaking this game, but it is going to be a lot different that what is shown here. I might continue to tweak this current version if I have the heart... but...

    The new version will not have buildings in every scene with 100's of building blocks on it. I still think there's where the problem lies. Instead, I'm testing what will essentially be a bonus stage similar to the old street fighter/final fight 'car bashing' scenes where there's only one rather large building and you have a limited time to try and destroy it for extra score.

    In my head right now, I see the game being more of an R-type clone than my original master plan. I can even see a way to expand a lot of ideas that never made it into this first version - such as having a series of levels where you're on the side of Earth and trying to repel the UFO invaders.

    We'll see how these prototypes do in testing. I've basically gone through and gutted my existing game and will soon be testing to see where all the problems originally lay. Though, a part of me will never get over this initial disappointment, I like where the new version is heading.
  • MotherHooseMotherHoose Member Posts: 2,456
    forklift said:
    ...
    I'm not sure what you mean by using a placeholder, though.

    oh I meant a blank actor image... that changeImages works with...

    lets see if I can explain clearer... 8(

    create an actor ... have a transparent.png initially as image
    drag instances of that actor to each scene... and use changeImage to show the correct image for scene.
    (you do have to put in correct width and height if different... no problem just look at the image size in Finder.)

    greatly cuts done on number of actors...

    MH

    EDIT: please do a publish in Mac Desktop and see how things work.
  • GamersRejoiceGamersRejoice Member Posts: 817
    MotherHoose said:
    oh I meant a blank actor image... that changeImages works with...

    lets see if I can explain clearer... 8(

    create an actor ... have a transparent.png initially as image
    drag instances of that actor to each scene... and use changeImage to show the correct image for scene.
    (you do have to put in correct width and height if different... no problem just look at the image size in Finder.)

    greatly cuts done on number of actors...

    MH

    EDIT: please do a publish in Mac Desktop and see how things work.

    So you're saying use one actor where applicable and edit the instance of that actor? That way you aren't adding more actors to the project file?
  • forkliftforklift Member Posts: 386
    That makes sense, MH. Thanks for the tip!
  • quantumsheepquantumsheep Member Posts: 8,188
    GamersRejoice said:
    So you're saying use one actor where applicable and edit the instance of that actor? That way you aren't adding more actors to the project file?

    Correct!

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • forkliftforklift Member Posts: 386
    OMG... i just realized that my building blocks are all 25x25 pixels... no wonder this thing is memory crashing! I am right in thinking that this is the leading problem? Is it treating all the building blocks as 1024x768 images?
  • quantumsheepquantumsheep Member Posts: 8,188
    Wait. Your 25x25 size blocks are using 1024 x 768 images???

    That's crazy! (Don't worry, we've all done it!).

    How many blocks like these are in a scene, typically?

    At maximum their image should be 64x64 to be crisp and clear (no need for resolution independence on an iPad - yet!).

    Have you tried reducing the size yet?

    Good luck,

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.