EasyRPG / Player

RPG Maker 2000/2003 and EasyRPG games interpreter
https://easyrpg.org/player/
GNU General Public License v3.0
989 stars 185 forks source link

Large CharSet support ($CharSet) doesn't work properly on looping maps #3149

Closed Mimigris closed 4 months ago

Mimigris commented 10 months ago

Player platform:

Windows, 64 bits continuous build of the Player.

Describe the issue in detail and how to reproduce it:

Create an horizontal looping map and place an event randomly in it. Use a graphic for its CharSet starting with the character $, and make it have a huge size in length (e.g. 1000% of a normal CharSet). Example with this version of the EasyRPG RTP CharSet Actor1, named here $Actor1. $Actor1

While in-game, if you are standing at the right of the event, you should notice that the event will not be displayed if the vertical line on its right is not displayed on the screen.

Here, the player is on the right of the event and the event is on-screen; the event is displayed: screenshot_7

Here, the player is on the right of the event, but the event is not on-screen; only the vertical line on the right of the event is displayed on-screen, so the event is still displayed: screenshot_8

Here, the player is on the right of the event, but the event is not on-screen and the vertical line on its right is not on-screen; the event is not displayed on-screen: screenshot_9

There is no such issue with the left side.

Another thing to note is that a big vertical CharSet can overlap differently depending on where you are located on the map, though it may not be a huge issue if said event is overlapping itself since I don't think that a lot of users would try that.

Ghabry commented 6 months ago

Found a solution for the complete disappearing of the charset. Patch follows next week, code currently too ugly :sweat_smile:

This will not solve the Z order "issue" (depending on your location other events are drawn above or below the large charset) but this isn't really solvable due to how charset rendering order works. So that part is Won't Fix/Not a bug.

(the lack of transparency is because the program I used to rescale messed up the color palette)

screenshot_1

Ghabry commented 5 months ago

Correction: I found the reason why the z order changes, so this is also looking good now and they stay the same priority :) (at least when testing on that simple map here).

before.webm

after.webm