YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

The sprite trembles, shakes, and flickers as it moves along its path #7452

Closed arrosev closed 1 month ago

arrosev commented 1 month ago

Description

I've been Googling for three days before this. When I create a path in my project and have my object move along the path in a loop, the object's sprite keeps jiggling while it's moving.

https://github.com/user-attachments/assets/d5112a17-4e8d-46fa-8617-1d9029bd94bb

Contact Us Package.zip

Expected Change

Sprites don't shake when moving

Steps To Reproduce

  1. Start GameMaker
  2. Run the project
  3. ALT + ENTER to launch full screen
  4. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.6.2 (Monthly)

Which platform(s) are you seeing the problem on?

Windows

Contact Us Package Attached?

Sample Project Added?

jackerley commented 1 month ago

Hi, I believe this is just a problem with the built in Windows video recorder, by default it records 30fps low quality videos. If you go to Settings->Gaming->Captures and choose 60fps, high quality video then you'll see a much smoother video recorded. You can also log out the deltas from your moving object and you will see that it is moving correctly. One thing to note is that you are moving the object by sub-pixel amounts but you don't have "interpolate colours between pixels" set so you will get a lack of smoothness as your object will effectively be limited to full pixel movements.

With these two changes here's the video that I see...

https://github.com/user-attachments/assets/a206c1ae-6de8-4edd-a927-820d01211660

arrosev commented 1 month ago

Hi, I believe this is just a problem with the built in Windows video recorder, by default it records 30fps low quality videos. If you go to Settings->Gaming->Captures and choose 60fps, high quality video then you'll see a much smoother video recorded. You can also log out the deltas from your moving object and you will see that it is moving correctly. One thing to note is that you are moving the object by sub-pixel amounts but you don't have "interpolate colours between pixels" set so you will get a lack of smoothness as your object will effectively be limited to full pixel movements.

With these two changes here's the video that I see...

Created.with.GameMaker.2024-08-28.14-24-18.mp4

Hi, thank you for your reply. I don't think it has anything to do with recording, the recorded video is just to demonstrate the jitter when moving. If you can run the test project I've provided, you can clearly see that the object jiggles when it moves. I can't use ‘interpolate colours between pixels’ because it makes everything blurry! I tried a lot of things from google before this, such as limiting the coordinates when drawing sprites by round, so that each time a sprite is drawn the coordinates are integers, but that didn't help. When I set the camera size in the room to 320 180 (my room size is 320 180) and the viewport to 1280 * 720, this jitter becomes slightly less noticeable, but this can lead to more difficult GUI layouts for multiple resolutions.

jackerley commented 1 month ago

I'm sorry, I don't see any problems in the attached project and if I modify it to print out the path deltas I get exactly what I would expect

x=65.94 y=126.06 deltax=0.71 deltay=-0.71 x=66.65 y=125.35 deltax=0.71 deltay=-0.71 x=67.36 y=124.64 deltax=0.71 deltay=-0.71 x=68.06 y=123.94 deltax=0.71 deltay=-0.71 x=68.77 y=123.23 deltax=0.71 deltay=-0.71 x=69.48 y=122.52 deltax=0.71 deltay=-0.71 x=70.18 y=121.82 deltax=0.71 deltay=-0.71 x=70.89 y=121.11 deltax=0.71 deltay=-0.71 x=71.60 y=120.40 deltax=0.71 deltay=-0.71 x=72.31 y=119.69 deltax=0.71 deltay=-0.71 x=73.01 y=118.99 deltax=0.71 deltay=-0.71 x=73.72 y=118.28 deltax=0.71 deltay=-0.71 x=74.43 y=117.57 deltax=0.71 deltay=-0.71 x=75.13 y=116.87 deltax=0.71 deltay=-0.71 x=75.84 y=116.16 deltax=0.71 deltay=-0.71 x=76.55 y=115.45 deltax=0.71 deltay=-0.71 x=77.25 y=114.75 deltax=0.71 deltay=-0.71 x=77.96 y=114.04 deltax=0.71 deltay=-0.71 x=78.67 y=113.33 deltax=0.71 deltay=-0.71 x=79.38 y=112.62 deltax=0.71 deltay=-0.71 x=80.08 y=111.92 deltax=0.71 deltay=-0.71 x=80.79 y=111.21 deltax=0.71 deltay=-0.71 x=81.50 y=110.50 deltax=0.71 deltay=-0.71 x=82.20 y=109.80 deltax=0.71 deltay=-0.71

etc. If I record a video with the improved settings I don't see anything either, this is recorded with the viewport at 1280x720 -

https://github.com/user-attachments/assets/9cbf56fa-b63b-4dfa-921e-89d6d263e720

arrosev commented 1 month ago

I'm just going to say what I ended up compromising on, because there may be others who have the same problem as me as well. surface_resize(application_surface,1920,1080); display_set_gui_size(320, 180); You can also use other resolutions for surface. I gave the gui layer a resolution of 320 * 180 (Same size as my room) because I wanted to use a fixed pixel size UI control, this way the UI controls get the same zoom as the sprites when going fullscreen.