Having a small sound/performance issue

SparkyidrSparkyidr Member Posts: 2,033
edited November -1 in Working with GS (Mac)
I have an actor that flies upwards when you are touching the screen (jetpackjoyride/icopter etc)

and I have things to collect onscreen etc etc.

All runs really silky on my shiny new 4s......until

I put sounds in on the collectables, and all good. Got a whole bunch of other sounds, and all fine.

And then I put a sound set to play, and loop when the touch is pressed (i.e. an engine noise for the ship)...and it all goes to hell.

There are REALLY noticable frame rate drops when it's playing the engine sound...but strangely, it also affects performance when other sounds are played (most noticeably the collactables sound...so even when the engine sound is not playing, triggering the collectable sound causes similar frame rate hicups)

Also....if I just hold my finger down, and let the ship get to the top of the screen and be settled, it's still playing the sound obviously, and the framerate also settles down....it seems to be tied to the touch even and the sound trigger, once it is in and loopping, all good.

i.e.
if I keep tapping the screen in quick succession, I can make it really jerky ;)

Just to add some info.
I am playing the sounds all at volume 0 at the start of the scene to make sure they are loaded into ram before any gameplay starts.
Also, all the sounds are pretty low bitrate mono .ogg files.

Wondering if .caf files are better on performance as they don't need to be decompressed???

Pretty annoying that a single sound behaviour is killing my performace.

or... maybe it's tied to the performance issue others have been having with the newer phones.
Just waiting for my 3gs to get some charge, so I can see how it runs on there.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    I have also noticed this in the past.

    If you have any rules that use timers over and over it usually a bad idea to put sounds in there.

    For eg if left = true every 0 seconds change motion linear velocity to 100

    I had to make a separate sounds controller actor for one of my games and it worked well.

    Best thing to do is trial and error i'm afraid.

    Darren.
  • SingleSparqSingleSparq Member Posts: 1,339
    Afraid this also happens in my Suburban Grand Prix game. I blame the last update as it was fine in .97
  • SparkyidrSparkyidr Member Posts: 2,033
    yeah.. kinda sucks.
    I ended up taking the sound out of any rules, and just letting it play all the time in the scene when play is active, no mater if I am touching or not

    Luckily, for the type of game it is, this works fine....but it's really just a bodgy workaround rather than a fix.
Sign In or Register to comment.