

I'm new to PICO-8 here folks but absolutely hooked! I'm having a problem with my player shaking during movement as well as getting caught on my flagged sprites that the player collides with. I know some basics and have compiled this code by watching tutorials and scanning forums for code snippets but I think I am mixing some things that don't play well. I am really going for a smooth player movement vibe so I just added some acceleration rather than an abrupt "p.x+=1" movement style. It doesn't appear to show in my GIF but the player shakes violently during gameplay. Any ideas as to what could be causing this would be greatly appreciated!




Are you setting the camera's position to where the player was before adding velocity? it seems the camera is always lagging behind by 1 pixel? Just a hunch



@SmellyFishstiks is correct, putting your cam()
funciton last in your game_update()
function removes the jitter.
but it looks nice so far!
as a bonus, if you check the x and y collisions at separately, you can have your character slide along the wall instead of getting stuck.



You are right THANK YOU! I have no more player jitter but I am still having a collision issue that causes the player to get stuck on flagged sprites if they are walking next to them. Any ideas?




[Please log in to post a comment]