So I’ve been wanting to make a top down RPG where the character move from “tile to tile”. I found this neat little extension called “Pixel Perfect Movement” which does exactly that. Here is the problem though:
On a tile grid of 16x16, with a character of the same size, whenever the character moves, ever so slightly chaotically, the sprite will constantly get offset of one pixels if not a few. It seems completely random. I’ve tried changing the max speed, the acceleration, the deceleration, it simply do not work.
I simply want it to stop offsetting my character randomly, no matter how chaotic my movements are.
https://imgur.com/a/t4oPB0g
First screen: This is the normal state of the character when booting up.
Second screen: Character got slightly offset by 1px to the left, and 1px down.
Here is the full project (Side notes: try avoiding colliding with the red guy as it closes the game, and if you collide with that ugly door, simply press Escape key to close the game).
Thank you, but that just creates more problems than it solve. Literally sticks you to a grid without ever being able to move. Only way that I can see that work would be to offset the character, which would make it so that you need to offset the background, all the other objects, and I’m not even sure if tilemaps would work.
Also I know about that template. My project is the same, literally. Yet, I have this problem while that templates do not, which is why I posted here, to figure it out.
Not really, no. I literally redone the entire template 1:1 and this problem still persist, even on a new project. Everything is the same size, grid is at the correct size too.
Did just that. Simply took the template, replaced the sprite with the same ones that was on that project link i posted, problem still occured.
I then reloaded the template again, simply modified how the sprites looked directly in the piskel editor, and that problem still occured. It’s quite simple to reproduce actually: simply replace the player with a red block, the background with some random colour and a clear outline, move around a tiny bit chaotically and you’ll get offset a few pixels. It’s alot more visible that way.
For 3 mins i was spamming arrow keys even was trying to press multiple ones opposite directions at the same time
I can’t reproduce
In example it snaps to grid perfectly
OK what i did
I opened that example i linked
I hit hit File > Save as > to my pc
I opened it in my gdevelop on desktop and i did same thing
File > save as > my pc (this time to same folder as game is)
So it download all assets and nothing is taken from cloud
Now i simply replaced image of brad4 with image of your player
I even copied your events into this copy of project and it is working perfectly fine
I do give you that
I did find few difference (in top down movement values) which were not same in example as in your project
But even after changing i could not find anything that would fix that getting out of grid
I also noticed that moving left and right player in your project is like shaking? a little bit idk how to describe it
While in example it is smooth as butter i try to make gif
Your project
Your player in example project
All your events are there
You just need to connect them to your dialogue or more likely create your dialogue
IDK WTF is going on
My best guess example using some older version of some extension? IDK But as you see it works perfectly build upon that
This bug is absolutely confusing the hell out of me, I won’t lie. This morning I tried (again) to see if I could get it to work on my side. Simply took the template, replaced the bard4 with my sprites, and well…: https://imgur.com/a/pgXcXiB the offset happened.
But then I downloaded yours and it’s all fine. I guess the mystery will stay, thank you though. Unsure if we can call that solved.