Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit) (+1)(-3)

Why does the player jitter so much when on slopes can you fix that this is almost what i need but that jitter looks like complete garbage and makes this useless.

(-3)

Even on 45 degree slopes the player still jitters as if the angle of the player was jittering between angles of 45 degrees,46,47, back to 46,45,44,43 like it constantly switches between all of those angles on the same 45 degree angle when it should stay at 45 degrees if its on a 45 DEGREE ANGLE!! You should fix this. otherwise its garbage.

(+3)

First of all, those are 30-degree slopes. The 45-degree slopes are so steep you slide down them if you try to stand on them.

The issue you see isn't angle jittering, it's caused by the demo having "interpolate colors between pixels" turned off, so all graphics are snapped to pixel-perfect coordinates. It usually makes pixelart look better, but having slopes and rotations gets all the sprites into non-integer-coordinate territory and then things get a bit iffier.

Your two main options to fix this would be either having interpolation turned on (which works the best if your graphics don't have a lot of crisp pixels), or have a special "draw angle" for the player that is snapped to, say, the closest multiple of 15 degrees:


drawangle = (15*((image_angle+7.5) div 15)) mod 360

Then just draw the sprite with that angle.

(2 edits) (-1)

Well I bought it, and used the draw_angle solution. The player still jitters around everywhere and the player starts sinking into the slopes. There's soo many bugs. It feels like the player doesn't know what the angle of the ground is. The way the player is staying out of the terrian doesn't feel right at all very buggy. I turned on interpolation between pixels and it helped a little but that isn't a solution for a pixel art game. Even with that the issues with aligning with the ground still occur. The player just jitters all over the place. How can I fix it?

(+1)

Have you changed the player sprite from the default? Since the sprite is used for some of the collision checking, having a different sprite (at least if it's a radically different size) could lead to changes in how the collision checking acts.

How big is the jitter / sinking? Single pixels or up towards entire tiles?

Instead of setting drawangle directly, you could try lerping towards it with angle_difference (so there's a smoother transition).

(tbh there's a lot of people that would argue that rotating sprites ruins the pixel art illusion too)