Skip to content
  • 0 Votes
    1 Posts
    661 Views
    No one has replied
  • Smooth character movement

    Unsolved Game Development
    27
    0 Votes
    27 Posts
    11k Views
    8Observer88

    I added the next comment to the bug report: https://bugreports.qt.io/browse/QTBUG-123862

    Try to run my example on macOS and Linux. Maybe it is a Windows issue. But requestAnimationFrame works perfectly smoothly on Windows: https://plnkr.co/edit/DebSXYMQ6TlgC7KT?preview It has a fixed 60 FPS, which means that the load on the processor is minimal.

    The worst result was with swapInterval=1, which I had at the beginning (I had not tried other values before). swapInterval with 0 and 10 is better, but not as good as requestAnimationFrame in JavaScript: https://plnkr.co/edit/B5t34XdK3MVi1WNb?preview (it is just a translation animation). I attached a source code "simple-translation-animation" (without rotation and scale animations). I attached EXE files for swapInterval = 0, swapInterval = 1, and swapInterval = 10:

    swapInterval = 0 - simple-translation-animation-opengles2-qt6-cpp-win10x64-exe-swap-interval-0.zip swapInterval = 1 - simple-translation-animation-opengles2-qt6-cpp-win10x64-exe-swap-interval-1.zip swapInterval = 10 - simple-translation-animation-opengles2-qt6-cpp-win10x64-exe-swap-interval-10.zip

    4623e1c6-0872-494d-881f-3b9677f8c17c-image.png

  • 0 Votes
    2 Posts
    867 Views
    G

    I'd like to bump this topic, it's been over 5 years and you'd think small sprites would be better respected and not blurry with the qt engine (as ya know, sprites came from the pixel era) , I've tried everything under the sun to get sprites that aren't blurry and it seems you have to basically use an AnimatedImage or your own sprite engine to make do.

    I would have modified the sprites item or made my own copy but I couldn't find a copy of its source