Skip to content

Severe rubberbanding in Yume 2kki's platforming section (3D Underworld) #3254

@Desdaemon

Description

@Desdaemon

Name of the game:

Yume 2kki v0.124g

Player platform:

Tested on Windows 11, Emscripten (ynoengine fork)

Attach files (as a .zip archive or link them)

Map1884.zip

Describe the issue in detail and how to reproduce it:

Enter 3D Underworld (MAP1884, savefile loads directly into it). Heavy stuttering occurs throughout the map, and is especially severe when the player image is situated between tile boundaries. This issue is not observed on RPG_RT.

Suggested fix is to reset the jumping flag unconditionally for Game_Player::MoveTo:

diff --git a/src/game_player.cpp b/src/game_player.cpp
index 48091e96..f99e88e2 100644
--- a/src/game_player.cpp
+++ b/src/game_player.cpp
@@ -159,11 +159,12 @@ void Game_Player::MoveTo(int map_id, int x, int y) {

                // This Fixes an RPG_RT bug where the jumping flag doesn't get reset
                // if you change maps during a jump
-               SetJumping(false);
+
        } else {
                Game_Map::SetPositionX(GetSpriteX() - GetPanX());
                Game_Map::SetPositionY(GetSpriteY() - GetPanY());
        }
+       SetJumping(false);

        ResetGraphic();
 }

This bugfix was first introduced in 2a69065 which used to be applied unconditionally, albeit unintended and was relocated to its current location in b3d0505.

Some additional notes:

  • There exist several other platforming areas with a similar gimmick, but the issue is most severely experienced here.
  • While not fully understood, the map author uses the SetVehicleLocation -1 and SetMoveRoute commands in a hot loop to simulate sub-tile scrolling. In the map, this is event ID 3 (":ドット単位スクロール").

A before and after of applying the diff:

1884_before.mp4
1884_after.mp4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions