Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2009

    Accelerometer performance with Qt


    I'm writing a 2D game using Qt. The idea is that the control system will use accelerometer via classes: QAccelerometer and QAccelerometerReading.
    It works, but when I display many gfx items on screen there are delays in accelerometer data readings though game framerate is stable (around 25 fps).

    By delays I mean that when I pivot phone in a direction accelerometer provides changes after 3-4 seconds later (not real time) which is not acceptable for game purposes.

    I'm using Nokia N97 and 5800 for my development.

    I also tried the following schemes:
    1. Pulling accelerometer data in every animation frame
    2. Pulling accelerometer data every 20 ms
    3. Using separate thread to pull accelerometer data 25 times a second

    Results are always similar - it works for a while reasonable ok and after a few moments I get the delays in reading. Maybe it's phone software is busy rendering my game and got problems in accelerometer data updates ?

    Can someone explain whether there's a design pattern for using accelerometer in games ?
    Also is there a way to receive accelerometer in real time (via Symbian C++ code maybe) ?

    Thanks in advance for help.


  2. #2
    Registered User
    Join Date
    Sep 2009

    Re: Accelerometer performance with Qt

    I have the same problem: when the game starts it works well, but after 3-4 seconds the accelerometer data are delayed.

    Quote Originally Posted by marcinos View Post
    Maybe it's phone software is busy rendering my game and got problems in accelerometer data updates ?
    I think this is the problem because if I reduce fps the game works well, but the gameplay is horrible and in my opinion it's strange (my game is not very complex, it has to manage few objets).

    (Sorry for my english, I must improve it!)

Similar Threads

  1. [Qt QML] Questions regarding QML Performance
    By SeanZhang in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-05-05, 13:07
  2. Replies: 4
    Last Post: 2007-11-26, 09:38

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts