Touch Response and High Frame Rates
  • neurofuzzyneurofuzzy September 2011
    Posts: 11

    I am noticing an interesting behavior with Pixelwave. I have a game I am developing with an onscreen controller. It's a joypad type controller where you drag a PXSprite within a larger PXSprite to move in four directions. 


    I am noticing that the touch response frame rate slows down significantly when Pixelwave is very busy drawing many objects at 60fps. Mind you, the view is updating very quickly, but the dragging is very slow, like 2 updates a second.

    If I slow down the pixelView.stage.frameRate to 45, then the touch response goes back to normal.

    Just as a test, I tried tracking the UINativeTouch returned from the original touch down event, instead of listening for PXTouchEvent_TouchMove events, and that made no difference. So, it's not the event dispatch that is slow.

    I am a beginner at all of this, so I don't know if this is just normal behavior or what, but I thought I'd report it all the same.

    Thanks!


  • JohnJohn September 2011
    Posts: 52

    It sounds like something is causing your app to go very slowly. We, unfortunately, can not send out touch events any faster then we receive them, and we receive them directly from the UIView (PXView). Have you tested the actual quantity of fps you are getting?

    Try:

    [PXDebug setCalculateFrameRate:YES];
    

    Then to get the timings you can use:

    [PXDebug timeBetweenLogic];
    [PXDebug timeBetweenRendering];
    [PXDebug timeBetweenFrames];
    

    However, these number will probably vary rapidly, so I would suggest 'smoothing' them in some fashion for easier to understand data. You can use this information to figure out which parts are taking up the most time. Note: Frames is a combined amount from logic and rendering.


    Hopefully this helps out, if not, see if you can make a small sample to reproduce the problem and post it.
    Pixelwave Team - Lead Developer
    // Clean before you build, otherwise the dust will get in.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter Sign In with OpenID

Sign In Apply for Membership

In this Discussion

  • John September 2011

Tagged

Top Posters