Skip to content

Conversation

@BlisterB
Copy link
Member

@BlisterB BlisterB commented Dec 31, 2025

This PR will address problems of Panoramas/Pictures not being correctly displayed when using Custom Resolution and the FakeResolution mode.
Problems occur when displaying a map smaller than the screen. With the FakeResolution mode, the map is centered (and black bar are displayed around the screen.
But Panoramas and pictures offset are not calculated correctly, resulting in wrong positioning.

I discovered that the root cause was that the code was assuming that small maps were always of the size of 320x240, therefore maps with size larger than 320x240 but smaller than the Custom Resolution were not handled correctly.

Please do not merge yet, the issue related to Panorama should be fixed, but I discovered that we have a similar problem with Pictures.

As mentioned in #3509, Aëdemphia is a great game to test this PR.

This also fixes #3342 .

@BlisterB
Copy link
Member Author

BlisterB commented Jan 1, 2026

ca660b6 Fixes the calculation of Picture's offset (the fix is similar to e073662 for Panoramas).

At first it didn't solve issues in Aëdemphia for some map smaller than the screen.
I discovered that the game uses the famous trick for centering pictures scrolling with the map. It retrieves the screen X/Y position of an event with "Control Variable" command, and place the picture accordingly to the result.

image

I discovered that when using FakeResolution mode, the result was wrong, ex. with a map of 20 horizontal tiles:

  • With the standard resolution of 320x240, the result was 160 for ScreenX
  • With the widescreen resolution of 416x240, the result was 112 (160 - the black border width of 48)

Turns out ControlVariables::Event() was applying an offset to the result in case of FakeResolution mode, this offset seems unnecessary because in FakeResolution mode, we want to keep the same value than with standard resolution.

80c4715 fixes this issue by removing this offset applying to the screen X/Y position when using FakeResolution mode.

Interior are now fixed in Aëdemphia, here is a video of the first town of the city with this PR:
https://www.youtube.com/watch?v=BKPsRmbDW0g

@BlisterB
Copy link
Member Author

BlisterB commented Jan 1, 2026

In Aëdemphia, the waterfall map using parallax effect displays Picture with the wrong offset, both with wide and ultra-wide mode.
It's the only map currently known with this issue, every other interior/exterior are OK.

In 320x240: OK
Ae Paralax 320x240.webm
image

In Ultra-wide: KO
Ae Paralaxe Ultra Wide KO.webm
image

@BlisterB
Copy link
Member Author

BlisterB commented Jan 2, 2026

The graphical bug previously reported on Aëdemphia, in the waterfall map with parallax, is not a bug related to EasyRPG.

While analyzing the code in RPG Maker, I found that the pictures used for the environments were not configured to scroll with the map. It's an error, as they are configured to scroll with the map in all other maps.
I suppose that it works with 320x240 resolution thanks to a mathematical coincidence.

By checking "Scrolls with the map", the problem is solved and the Parallax even works as expected. Here is a video showing the result:
https://www.youtube.com/watch?v=UAF4Ljm-a9s

This further validates the implementation of this PR. 👍

GetImage GetImage(1) GetImage(2)

@BlisterB
Copy link
Member Author

BlisterB commented Jan 3, 2026

c60093d Fixes the starting position of the camera :

  • when the hero is on a looping map
  • using the FakeResolution mode
  • with a map too small for the screen

It applies an offset corresponding to the black border's size.

Fix one of the two problems from #3511
I still need to fix the camera not centering to the player while they move.

image

@BlisterB
Copy link
Member Author

BlisterB commented Jan 4, 2026

d580fce Fixes the scrolling of the camera :

  • when the hero is on a looping map
  • using the FakeResolution mode
  • with a map too small for the screen

It applies an offset corresponding to the black border's size in Game_Player::UpdateScroll(int amount, bool was_jumping).

The issue #3511 is now completely fixed

@BlisterB
Copy link
Member Author

BlisterB commented Jan 4, 2026

Here is a showcase of the scrolling fixed on "Onsen: A Tale of Yu"
https://www.youtube.com/watch?v=90M5MDDiY7s

@BlisterB BlisterB changed the title [WideScreen] Fix the calculation of the Panorama's/Picture's offsets when using fakeResolution [WideScreen] Various fixes related with FakeResolution Mode (Pictures/Panoramas' position & Camera Scrolling) Jan 4, 2026
@BlisterB
Copy link
Member Author

BlisterB commented Jan 4, 2026

@Ghabry I fixed all the known issues related to FakeResolution mode, this PR is ready for review :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[Wide screen] Bug with "Change Parallax Back" command

1 participant