Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. SpriteSequence disable smooth scaling
Forum Updated to NodeBB v4.3 + New Features

SpriteSequence disable smooth scaling

Scheduled Pinned Locked Moved QML and Qt Quick
qt quickspriteanimationgame
2 Posts 2 Posters 957 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KiNgFrUiT
    wrote on last edited by KiNgFrUiT
    #1

    I am making a game and the artwork has a pixelated style.

    I would like to use a SpriteSequence but cannot find a way to turn smooth scaling off, I want blocky images. Using the property Smooth:false doesnt do anything. I wish to avoid scaling all of my images x2 in photoshop as this wastes space.

    I am able to achieve the desired look using AnimatedSprite but then the state machine functionality is missing.

    My platform is Windows 7 64bit and my Qt version is 5.5 mingw

    SpriteSequence {
        id: ss
        x: 200
        y: 200
        width: 32
        height: 32
        scale: 2
        interpolate: false
        goalSprite: ""
        smooth: false // valid but has no effect
    
        Sprite {
            name: "left"
            source: "unit.png"
            frameCount: 3
            frameWidth: 32
            frameHeight: 32
            frameRate: 20
            frameX: 0
            frameY: 0
            smooth: false // cannot be used here
        }
    
        // additional sprite states removed
    }
    
    AnimatedSprite {
        id: left
        x: 400
        y: 200
        source: "unit.png"
        frameHeight:32
        frameWidth:32
        running: true
        frameCount:3
        frameDuration: 20
        width:32
        height:32
        scale: 2
        smooth: false // works great
        frameX: 0
        frameY: 0
    }
    
    1 Reply Last reply
    0
    • G Offline
      G Offline
      Ginzo M
      wrote on last edited by Ginzo M
      #2

      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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved