question : what gives the biggest frame rate hit

SparkyidrSparkyidr Member Posts: 2,033
edited November -1 in Working with GS (Mac)
Just wondering...
In everyone's experience so far, what sor of stuff gives the biggest frame rate hits.

I'm currently going through my game trying to squeeze a few more fps out of it. (plays at around 40fps on 3gs)

I don't really have a lot going on
A player moving with the accelerometer(or keys) and a particles actor that constrains to it's x/y
An actor that spawns enemies at timed intervals
An actor that spawns bonuses at random timed intervals
A home, music on/off and pause button (pause stops all movements, and spawns a pause screen)
A background non moving image, and a music file that plays

And that's it.

In my n00b brain, that doesn't feel very complex.

So anyways..
I have been removing/tweaking things to eek some more fps out of it.
I thought maybe the spawning was causing that 20frames drop.. so as a test removed both spawners from my scene.. but still averaged around 40 frames.

I then tried reducing the particle numbers on my player particle...but still 40 ish

Tried not having the music.. still around 40

I then removed my player object from the scene.....and that's where the 20 fps are going.
I guess it makes sense, as that's the object with probably the most rules attached to it.

Just wondered what everyone elses experiences were...

And also, the same with load times. I'm assuming graphics and sound give the biggest hit there?

Comments

  • JoshKahaneJoshKahane Member Posts: 470
    To say very simply. I would say spawning actors. More of them there are a lot more lag occurs. Also even worse when they are spawning and being destroyed at the same time. Thats what I think personally is the worst offender.
  • SparkyidrSparkyidr Member Posts: 2,033
    just figured out where most of my 20 frames went.

    I had an actor that was constrained to the player, spewing out particles in such a way as to look like a faded trail behind you.
    Deleted that actor, and bam, 60fps

    but it doesn't look as "cool" :o)
  • BeyondtheTechBeyondtheTech Member Posts: 809
    @tshirtbooth: Perhaps you should set a timer so that it wouldn't update the number at every frame?
  • ktfrightktfright Member Posts: 964
    Particles also kill a lot of your frame rate for some reason. They look cool, but for older gen devices, its not worth it sometimes.
  • JGary321JGary321 Member Posts: 1,246
    Ya, just create an animation sequence constrained with an offset to your actor. That way it just cycles through the images. Great look without much of a frame hit.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    I have found sounds can kill you. Often when a sound plays the first time you get a good jitter. I found that when the scene opens to have one actor play all my sones at zero volume just to load them and get that one jitter out of the way.
  • TwistedMechTwistedMech Member Posts: 408
    For me the killer Is bullet spawn with laser fx. I now have an actor which controls the fx with 0.2 delay so it does not collide with the bullet spawn.
  • jkornoffjkornoff Member Posts: 55
    How are you guys measuring fps? Is there a tool for that?

    @TinyMonster - That is a great tip!
  • SparkyidrSparkyidr Member Posts: 2,033
    @jkornoff
    not sure how accurate it is, but when you first send a GS file to the viewer on your phone, the mac window shows an fps readout in the top left.
  • JamesZeppelinJamesZeppelin Member Posts: 1,927
    I dont measure fps in the viewer. To me there is only one thing that matters.
    How does it play. Can have killer FPS but lag here and there and kill the game I.E the sound example i mentioned. Those were killing me when i played but my reported FPS was great.

    1. Since Fps is only a snapshot how accurate can it really be (IMO)
    2. All devices are diff so what is on the viewer wont be the same on the devices anyways
    3. Cant assume if its fine on a gen 1 device its fine on the newer ones. True for the most part but oddly i had one demo work fine on my gen 1 touch but crappy on my 3Gs

    I cant say this enough TEST on ALL devices.

    Tip: You can pick up an gen 1 3g with a crack on the screen on ebay for really cheap these days.

    I got new touch for for under 100 bucks and an older touch for only around 30
    Both have a small crack but work awesome.
    Seems alot of people do have a new device but just not an old one to test on.

    Luckily I got a 3gs and 3g from my last job (thank god)
  • TobyToby Member Posts: 478
    Large scrolling backgrounds and a camera constrained actor with acceleration and deceleration.
Sign In or Register to comment.