Player icon indicating copy to clipboard operation
Player copied to clipboard

Event sprite priority issue (overlapping events) in "Die Reise ins All"

Open florianessl opened this issue 6 months ago • 5 comments

Game: Die Reise ins All Savegame: Save11.zip

In this short sequence, the character of "Kreatur" (the big Frankenstein Monster guy) enters a small tent & disappears shortly, while the other characters remain outside. In EasyRPG, he remains visible in the tent entrance due to some drawing priority issue.

Note that the event code here is a bit misleading. After the route of the big guy has been processed & he has entered the tent, switch S1074 ("Kreatur erscheint" - EN: "Kreatur appears") is set to OFF, but the event actually is set to be visible via S1072 ("Eleonore erscheint" - the switch assigned to the female character). The wanted behavior of making "Kreatur" temporarily disappear is thus actually achieved by the drawing priority of the events. (The tent is also completely made up of events) (When "Kreatur" reappears, the script code does not even consider setting S1074 back on)

Tent entrance Event ID: 0022 Kreatur Event ID: 0052

RPG_RT Image

EasyRPG Image

florianessl avatar May 03 '25 16:05 florianessl

I tested around a bit & found out, that the Z-layer priorities seem to work out for every RM2K build & all versions of RM2K3 prior to the English Steam release. The Z layering code was changed for v1.12 of RM2K3 & this seems to be the way EasyRPG implements it as well: https://www.makerpendium.de/wiki/RPG_Maker_2003:_Changelog

florianessl avatar May 05 '25 08:05 florianessl

Before 1.12 the rendering order on the same tile was "undefined behaviour" and since then it is ordered by the ID. Unfortunate that you found a game that has a visual bug because of this :(.

To make it a "undefined" you can remove the GetId from here: https://github.com/EasyRPG/Player/blob/61bbd8be8dda69f3839b0328e21ccbcb0bbd3344/src/game_event.cpp#L121

But if this makes it works it's just luck as the rendering code is not related to the RPG_RT one at all.

Ghabry avatar May 05 '25 08:05 Ghabry

Before 1.12 the rendering order on the same tile was "undefined behaviour" and since then it is ordered by the ID. Unfortunate that you found a game that has a visual bug because of this :(.

To make it a "undefined" you can remove the GetId from here:

Player/src/game_event.cpp

Line 121 in 61bbd8b

return Game_Character::GetScreenZ(x_offset, y_offset) + GetId(); But if this makes it works it's just luck as the rendering code is not related to the RPG_RT one at all.

Oh ok. I was just about to message Cherry about this, but that clarifies that. Simply removing the "GetId()" part doesn't seem to work out for this game. So our rendering code prioritizes things differently when the Z-layers match...

florianessl avatar May 05 '25 09:05 florianessl

Knowing that Cherry likes to document his findings I quickly searched RPG-Atelier & found something: (So there's no need to bother him because I'm sure he's got lots of work already with his entrepreneurial endeavors...) https://www.multimediaxis.de/threads/144005-RM2k%283%29-Bugfix-Patch-IPS-Konsistente-Z-Order-von-Events-am-selben-Tile?p=3324704&highlight=layer+event#post3324704 I'll look, If I can emulate something based on this description.

florianessl avatar May 05 '25 09:05 florianessl

Another minor issue with layer priority, found in the game Wolfenhain: Save07.zip

Here the player has to complete a tricky trial: Taking one of the sticks & using it to point out the number seven on the board. (No worries, I added screenshots) When the right stick is taken, after the player points out the number, the shaman has his own ordeal: combating his layer priority with the event of the remaining stick. This battle leads to different results in RPG_RT & EasyRPG.

RPG_RT: Image

EasyRPG: Image

florianessl avatar May 12 '25 16:05 florianessl