Resetting memory

Are there any alternative options to reset the memory cache for Art or audio? I currently use the reset scene behavior.

Answers

  • zzap64zzap64 Member Posts: 405
    edited December 2012
    Please help, anyone have any advice for resetting audio memory Ram in the project.
    GS pre loads all my audio, no matter if I spawn the audio as actors then destroy them.
    With the reset scene behavior I can reset the art ram but not the audio. My audio is 50 MB Ram and the Total ram causes me problems on lower end android devices.
    thanks.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited December 2012

    Hi @zzap64 I'm not certain about this, but I've a horrible feeling that audio in RAM isn't flushed; it's all loaded at the beginning and stays there, whether or not you are using Reset Scene or even Reset Game behaviours..... tho' I stand to be corrected on this, of course.

    Edit: thinking this through a bit more, maybe only music or sounds called to play load into the RAM anyhow, and when they stop playing, they are flushed then... so I doubt 50mb is loaded into the RAM in one go... (totally opposite to what a just said!) Why do you think GSC loads it all at once?

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

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I think people are thinking their game runs slow because of music et... This is untrue. It's file corruption and bloated logic. I just redid a developers code because the file was corrupted by to much deleting and such. The file he sent ran at 40FPS and after I rebuilt it from scratch, I did slim down the logic, but it was exactly the same as to media aka images et... And I gave him back a project running at 60fps. This is why it's important to version out a copy every time one works on a file.
  • zzap64zzap64 Member Posts: 405
    Hey @gyroscope
    My audio is triggered by actors with simple logic when an attribute is true & just play that audio file. I have approx 300+ audio files mostly played sequentially.

    When I first load the app on the hardware, the viewer stats show that the Audio RAM is 50 MB. This is before any audio is played, hence my assumption that GS pre-loads it. I have even tried to spawn and destroy actors containing the audio logic but that doesn't make any difference.

    @FryingBaconStudios
    My issue is just the RAM size, the FPS speed is ok for my needs.
    On low end Android devices such as Droid 2.2, when total RAM exceeds 130 MB it will crash/reset the viewer.

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

    Hi again @zzap64 I still think that the viewer stats shows the contents of the file, not what's loaded into RAM... I'll have to go check, I can't remember... still, I think so....

    So to say again, the GS engine only loads audio as needed, and at a guess, flushes it when finished...

    It'll be great if someone else can confirm or correct this....

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

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2012
    I would just publish the game and test it without the viewer. What is the FPS btw? As there is no such thing as good enough for my needs. FPS determines how fast the code reads and this includes audio playback. If the FPS is low this causes a system hang and most mobile devices force an app to crash after a specific hang time. This is why many GS users are having crashes in IOS6 as Apple has reduced the hang time amount before the OS forces the app to crash.
  • zzap64zzap64 Member Posts: 405
    @FryingBaconStudios, @gyroscope

    Thanks for your quick responses.

    Everytime the total RAM hits 130MB or more, the device disconnects from the viewer, no matter where I am in the app at that time. I can trigger it by adding more art, audio whatever.
    If I remove all the actors with the audio logic the audio Ram drops to < 1Meg, which in turn affects reduces the total RAM.

    I will try it without the viewer tonight. Do I just create an unsigned APK and just install that file on the hardware like any other APK ?

    I assumed FPS was frames per second ???
    On the Droid 2.2 is around 40. My app is an interactive book and doesn't require fast action fingers or quick reactions from the user.
    cheers
  • lycettebroslycettebros Member, PRO Posts: 1,598
    I would just publish the game and test it without the viewer.
    Every time! I almost never use the viewer.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    40 FPS is horrible for any app. This will cause hangs and when the app hangs for a set time the OS either Android, Apple will dump the app. You need to get the FPS up to 50. For android adhoc just install the signed version on your phone.
  • POMPOM Member Posts: 2,599
    I think people are thinking their game runs slow because of music et... This is untrue. It's file corruption and bloated logic. I just redid a developers code because the file was corrupted by to much deleting and such. The file he sent ran at 40FPS and after I rebuilt it from scratch, I did slim down the logic, but it was exactly the same as to media aka images et... And I gave him back a project running at 60fps. This is why it's important to version out a copy every time one works on a file.
    @FryingBaconStudios
    You know , iv'e seen you saying this few times now, and since the first time i saw you posting about this i started versioning out copies, but i still wonder if this is real , and if it is real, how can i fix 10 months of development without this advice? 10 months of developing with creating and deleting and creating and deleting "code" in GS must cause some serious lags if what your clamming is true, obviously i cant remake the game from scratch , it's way too big with hundreds of actors in each scene , what is the alternative? if there is any..

    Roy.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited December 2012
    @p-o-m I don't think there is one. As with the file I was contracted to fix, I even tried deleting all the code and saving the Person's layout as he had about ten levels built and the file was still crud. I noticed this long ago in the early stages of a project a year ago and from then on I decided to prototype outside my project and also version save a lot. The current project @RP and I are working on was build this way. It is very heavy with vector physics of events that happen in milliseconds simultaneously. It runs at 60fps. I credit this to two things, slim efficient code and keeping the project clean by doing very little deleting. Prototyping is a bit more work but in the end it could save you hundreds of hours of hard work. I will always keep this work method as it has proved to be very reliable. And I can't stress enough, version save, version save, every day, or have time machine.
  • ElfizmElfizm Member Posts: 489
    What to you mean by "deleting". What are you referring to? @FryingBaconStudio
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Removing attributes, images, scenes et.....
  • zzap64zzap64 Member Posts: 405
    hey, thanks for all the insight, appreciate your experience @FryingBaconStudios, @gyroscope, @P-O-M, @lycettebros

    On a side issue, I'm unable to install my APK on the device.
    I Publish through GS, sign the two APK's, copy both to the device but at the end of installation the Droid says 'unable to install application'
    Is there something obvious I'm missing or could it be a 101 issues related to the device ?
  • 3itg3itg Member, PRO Posts: 382
    edited December 2012
    On your droid, go to your menu > Settings> Applications...
    Here there is usually an option to "allow Unknown Sources" which will allow you to install APKs from anywhere, not just the market.
  • zzap64zzap64 Member Posts: 405
    @3itg
    Thanks man but unfortunately that option is already ticked !!!
  • zzap64zzap64 Member Posts: 405
    I just tried installing the unsigned APK on a newer Samsung phone but it still reports the error 'Application not installed', is it something wrong I'm doing with the signing process ?
  • gamesfuagamesfua Member Posts: 723
    @fryingbaconstudios i'm not entirely sure about the claim of deleting attributes etc. affecting performance. I've been working on an attribute intense game for almost a year now. I've been deleting scenes, redoing code, updating actors, etc. and i'm getting 60 fps. And this game is massive! Its not a simple game at all. Please don't confuse anything i'm saying as being challengy. Farthest from. I'm actually just curious. Perhaps i've just been extremely lucky.
    I do make save versions every day and even zip them now. I've found performance has increased by my tinkering. That said i'm also extremely cautious about what i delete. I ensure that all actors and code that go along with the attribute are destroyed before deleting that attribute.
    I guess what i'm getting at here is, perhaps deleting things is not the culprit- its sloppy deleting. Or maybe even constantly importing content from different sources and then moving stuff around. Not sure.
    But i'm curious about what you've said. I'd love to hear a bit more because i'm going to be a lot more cautious if what you're saying is 100% concrete. Thank you! Really appreciate your knowledge base :)
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I can tell you from my own experience that I deleted something in a project and watched the file start to act weird. The time it took to open slowed greatly and the frame rate dropped. I had to abandon it. What I would clarify is excessive deleting is what I mean. But for some reason, and I don't know how or why, this can strike at anytime. It seems the info doesn't get entirely deleted in the XML file or in the background. It seems some traces remain and screw up the file.
  • gamesfuagamesfua Member Posts: 723
    @fryingbaconstudios lets hope GS fixes this!
  • 3itg3itg Member, PRO Posts: 382
    @zzap64
    I believe you want to be attempting to install the signed apk for testing.
  • TimBOSSDevTimBOSSDev Member Posts: 44
    I too have troubles with my app. I've been working on this music/DJ app for a couple of months now, there's one main scene where everything happens, even the tutorial for the music app. The problem is that because of all the loadings of the images and I believe due to a lot of deleting and logic changes I've done, that the app became a corrupted file or something. The app uses an average of 300 MB of RAM which is horrible because the app usually crashes now when I open it. the loading time used to be reasonable before, but slowly it got to 35 Seconds to load the app!!! and hoping that the app doesn't crash now!! The funny thing is, deleting and making the logic better and unchecking the preload art and stuff not only did not help, rather it made it worse!! So I'm having a lot of trouble now, because the app's done and ready to be submitted but cause of these RAM usage problems and file corruptions, It's putting me back on submission, So I've been looking for people who can help me with the file and I hope GS fixes some of the file corrupting issues with the XML file as @FryingBaconStudios mentioned.
  • zzap64zzap64 Member Posts: 405
    hello
    I know this thread covered a few topics but I'm still stumped.

    I'm trying to install the .APK to my android devices but to no avail. When installing the signed file it says 'installing...' then fails with 'Application not installed'.

    The weird thing is that previous apps i've released to Google Play work fine when installing from that store but the APK's I generate and sign with GS never install. I can use the GS viewer but really want to test my apps on the hardware proper.

    I have two android phones, OS 2.2 and 2.3.

    I reinstalled all the android SDK's onto my Mac from scratch & new Keystore signing but doesn't fix the issue.

    Any suggestions please, I've literally run out of idea avenues to try out.
  • zzap64zzap64 Member Posts: 405
    I've also tried just creating a hello world apk but that too doesn't want to install onto my hardware!
    So I installed GS creator on another machine, a PC this time, downloaded Android SDK's, Java SDK etc. Published a hello world APK and still receive the not installed error message on the device.
    what the Frakaroonie am I doing wrong..!?
  • zzap64zzap64 Member Posts: 405
    edited January 2013
    ok, I've narrowed down my findings.

    When I use "jarsigner -verify" on my signed Android app, it comes back with the following :

    s = signature was verified
    m = entry is listed in manifest
    k = at least one certificate was found in keystore
    i = at least one certificate was found in identity scope

    jar verified.

    Warning:
    This jar contains entries whose certificate chain is not validated.

    Also, installing the APK via terminal results in :
    INSTALL_PARSE_FAILED_NO_CERTIFICATES

    Any suggestion on what I need to do ?
    thanks.
  • RubiWorksRubiWorks Member Posts: 130
    i have the same problem. I signed my apk but when i want to install say me "application not installed"
  • zzap64zzap64 Member Posts: 405
    I removed java 7 and installed version 6 which fixed the issue for me.
  • RubiWorksRubiWorks Member Posts: 130
    I removed java 7 and installed version 6 which fixed the issue for me.
    and how can i do that in mac @zzap64? in Windows is so easy... But in Mac o_O

  • SolarPepperStudiosSolarPepperStudios Member Posts: 754
    I don't think it is even possible to load 130 sound files in to an iPad's ram, not even considering a lower generation device! The iPad at most only has 512-1024 MB of ram! The 3rd gen devices only had 256 MB and the 4th gen devices 512. That would indeed slow it down IF GameSalad did load them all at once.
  • zzap64zzap64 Member Posts: 405
    My app has 400 sound files (most are spoken sentences). I imported the majority to GS music files as they have hardly any impact on the devices Ram. It all works fine.
Sign In or Register to comment.