Rules causing scene to loads 6 times slower

zzap64zzap64 Member Posts: 405
edited October 2012 in Working with GS (Mac)

I have many audio files being played by variables referencing a table in a project on a second scene.

Worked fine in GS until I created my adhoc and played on the iPad. The second scene with the audio now loads 6 times slower.
I thought that putting the rules that activate the SFX in actors that spawn & destroy off screen when needed would be less burden but to no avail.
If I remove the rules to play the audio from the scene it loads the second scene at normal speed.

Nothing fancy with the rules, basically when variable 1 = a row & column table position it plays the audio file.

Hopefully that makes some sense but I'm a little stuck what to try next ?

Best Answer

  • CluvCluv Posts: 229
    Accepted Answer
    Congrats! Sounds like you have it figured out. I hope your app does great.

Answers

  • CluvCluv Member Posts: 229
    Have you replaced the audio at any point before creating the adhoc, by any chance? Like, was there a problem with the audio and then you replaced it, but didn't change the name of the audio? I have heard that causes issues. Maybe try copying your gamesalad file and re-importing some of your files with different names and renaming them in your table and see if that fixes the problem.

    Also, I am uncertain that putting them off-screen would be less of a burden... Hopefully when they go full native some of the memory allocation issues will be fixed.

    Let me know if that helps. I am using a lot of audio in my project as well, but am using the standard function in gamesalad to play so I am interested to see how the tables work out for you.
  • floydianspiralfloydianspiral Member, PRO Posts: 308
    I too would be interested in how you're using a table to play audio as I'm making a generative music creation game and on any given level I have 200+ rules randomizing sound files and it takes 10-20 seconds to load on an iPad 2. Whenever I preview it in creator it loads very quickly but on the device it takes that long so just letting you know that what you're doing is normal, it just takes a long time to load a lot of audio files into a scene.
  • zzap64zzap64 Member Posts: 405
    Hey thanks for your feedback @Cluv & @floydianspiral.

    I introduced 300 sounds that are individually triggered (only one at a time). I have 300 rules that each play the sound behavior via a variable that calls from a table. So it's not a new technique that allows to play sounds from a table i'm afraid :).

    However, the sound rules are on my scene 2 of 2, when I added these simple rules the scene transition slows down, exponentially.
    e.g. 50 rules = 1 second scene load delay, 300 rules = 6 second delay.
    Remember, it only plays 1 sound at a time.

    I tried bundling a bunch of these rules into spawning actors that are in turn destroyed but it had no effect on the scene load speed.

    I'm thinking now to combine both scenes into one and having the 'delay' added into the initially loading of the app.



  • CluvCluv Member Posts: 229
    So the rule allows you to use the sound? How are you iterating through the rules? Are you using a counter or a timer?
  • zzap64zzap64 Member Posts: 405
    no timer, the table row and column are piped into x,y variables then 300 play sound rules are linked to the variables. nothing special, just a pain to create so many rules.
    I have everything on one scene now, just need some more work before I test it. Ill let you know,
  • zzap64zzap64 Member Posts: 405
    My app now takes approx 25 seconds to load but everything is now on one scene and runs perfect. 300 lines of speech all with an individual 'load sound' behavior.
    Submitted the new version to apple today!
Sign In or Register to comment.