Demonoire Diagonal Sprite Pixel Issue

0 favourites
  • 9 posts
From the Asset Store
Dirt Bike game sprites - including environment, human rider and more!
  • When messing around with the Demonoire project I have noticed that when I move the character in a diagonal manner that the camera scroll moves in a horizontal-then-vertical manner. I have tried a variety of settings for the project (pixel, rounding, point sampling, etc.) and have yet to find a lasting solution to this problem. I have searched for solutions through the forum and the web and haven't found a definitive way of going about it that doesn't involve super-sampling the size of the game. I know the diagonal movement changes the speed either 1.707 or .707 times the vertical-horizontal speed when rounding the position of the sprite, but this alters the gameplay in a negative manner in my opinion.

    So first off, do you notice this camera jerkiness on diagonal movements as well?

    Secondly, any thoughts on how to go about fixing it, if it is possible?

  • Ashley I'm working on a project and this would be a huge fix if I can figure out.

  • What's the resolution of the project? I'm if it's very low. I'm guessing you're not doing subpixel scrolling. Make sure pixel rounding is off, and that you're not using "round" on the scroll to position event. If you're scrolling to the character that can't stay on half pixels, maybe you can try add a little lerp to the scroll to make it more smooth?

  • Basically the camera is jumping from pixel to pixel at the low window resolution (312 x 240)

    The quick and simple solution is to set both

    Fullscreen Quality to High

    Pixel rounding off

    You need to set the fullscreen quality to high (to to render at max resolution ) to see the benefit of setting pixel rounding off.

    If you just set pixel rounding off without setting fullscreen high there will be no difference as the game is still rendered at the low resolution

    you can also add a lerp to ease the camera to and from the position but not really nessesary at that speed.

    This works with this game because the game assets are of a constant pixelart scale. If there were assets of higher resolution being passed off as pixel art (using fullscreen quality low) this would expose them for the higher resolution sprites that the really were .

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What's the resolution of the project? I'm if it's very low. I'm guessing you're not doing subpixel scrolling. Make sure pixel rounding is off, and that you're not using "round" on the scroll to position event. If you're scrolling to the character that can't stay on half pixels, maybe you can try add a little lerp to the scroll to make it more smooth?

    I maintained the exact resolution of the Demo Project. Pixel Rounding is off. I think I have tested both with and without scroll to position event. What does work is round the position of the character however that makes the actual movement speed imbalanced. Ok thanks, will test and get back.

  • Basically the camera is jumping from pixel to pixel at the low window resolution (312 x 240)

    The quick and simple solution is to set both

    Fullscreen Quality to High

    Pixel rounding off

    You need to set the fullscreen quality to high (to to render at max resolution ) to see the benefit of setting pixel rounding off.

    If you just set pixel rounding off without setting fullscreen high there will be no difference as the game is still rendered at the low resolution

    you can also add a lerp to ease the camera to and from the position but not really nessesary at that speed.

    This works with this game because the game assets are of a constant pixelart scale. If there were assets of higher resolution being passed off as pixel art (using fullscreen quality low) this would expose them for the higher resolution sprites that the really were .

    Unfortunately the fullscreen quality is only reasonable in small layouts. One weird thing I have noticed is that if I create a camera object that follows the position of the character and keep the camera speed at 60 or 90 (custom movement behavior) the diagonal scroll is smooth however any other speed returns the jerky scroll experience.

  • > Basically the camera is jumping from pixel to pixel at the low window resolution (312 x 240)

    >

    > The quick and simple solution is to set both

    >

    > Fullscreen Quality to High

    > Pixel rounding off

    >

    > ....

    >

    .....Unfortunately the fullscreen quality is only reasonable in small layouts....

    What do you mean by this ?

    If you load up Demonoire, set full screen quality to high and set pixel rouding off (unchecked) you will get perfectly smooth scrolling in all directions. You may get the odd jank as the c3 editor , or other browser operations fight with the preview in the browser but that will be minimal when deployed as app/ nwjs / website.

    f you are talking about your own game then you need to post a c3p of some sort showing your events and set up. otherwise it is hard to help.

  • >

    > > Basically the camera is jumping from pixel to pixel at the low window resolution (312 x 240)

    > >

    > > The quick and simple solution is to set both

    > >

    > > Fullscreen Quality to High

    > > Pixel rounding off

    > >

    > > ....

    > >

    >

    > .....Unfortunately the fullscreen quality is only reasonable in small layouts....

    >

    What do you mean by this ?

    If you load up Demonoire, set full screen quality to high and set pixel rouding off (unchecked) you will get perfectly smooth scrolling in all directions. You may get the odd jank as the c3 editor , or other browser operations fight with the preview in the browser but that will be minimal when deployed as app/ nwjs / website.

    f you are talking about your own game then you need to post a c3p of some sort showing your events and set up. otherwise it is hard to help.

    With simpler layouts such as Gatewood it works well, however more complex layouts result in fps drops.

    For example, I have an outside layout, where fps drops to around 20, however if I walk into a house with a much smaller layout, the fps is 60, with smooth scrolling. Thus, if I go this route I think will have to limit my layout sizes drastically.

  • Hmm.. yea you will be processing more pixels so that will give you a hit. But most modern graphics cards should eat that up no problem. Maybe not on mobile though.

    I wouldn’t have thought the hit would be compounded by layout complexity though (unless you are stacking a lot of things on top of one another) as you are still processing the same number pixels and anything outside the window is not drawn.

    anyway i recall when i made a low res platformer I had similar issue and did this

    try a simple lerp

    https://www.scirra.com/tutorials/626/ma ... ing-camera

    but use lerp like this ( a = lerp(a, b, 1 - f ^ dt) ) as described here

    https://www.construct.net/fr/blogs/ashl ... a-time-924

    but then the trick is to stop the lerping camera from trying to complete the lerp all the way to the player

    so stop it when it is 80 % 90 % there , this stops the slow lerping from pixel to pixel causing jumping around.

    there are a few ways to do this , maybe mess with the formula above or just have a large hidden collision sprite that stops the lerp

    there are lots of other things you could do to smooth out camera and limit unwanted movement

    camera systems can get real complex.

    AND/OR you could scale up all you assets layout and window size by a factor of 2 or 4 etc

    this will allow you to increase the movement resolution but still fake low resolution and without using fullscreen scaling high,

    not 100% but i think many new pixel art games take this approach, (also allows high res lighting and a soft anti aliasing (linear sampling.)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)