Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panoramas are not pixel perfect #1534

Closed
fmatthew5876 opened this Issue Dec 7, 2018 · 13 comments

Comments

Projects
None yet
5 participants
@fmatthew5876
Copy link
Contributor

fmatthew5876 commented Dec 7, 2018

parallax

Left: RPG_RT, Right: Player

Look at the lower right corner. In RPG_RT you can see 2 stars, one of which is halfway obscured by the glass tile. On the right, you see only 1 star.

This issue was produced by creating a 41x31 map and setting the panorama to Cosmos1 with no scrolling.

@carstene1ns

This comment has been minimized.

Copy link
Member

carstene1ns commented Dec 7, 2018

I remember the same thing years ago in wulfhammer. In the creator room there was also some moon background that behaved wrong. I think this got fixed along with yume nikki back then,there might be some closed issue about.

@Ghabry

This comment has been minimized.

Copy link
Member

Ghabry commented Dec 7, 2018

Do you mean "jumping panorama" when crossing a map-loop border?
Can't remember the issue either tough.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 7, 2018

Nothing jumps, its just a big picture on a big map that is slightly off in how it scales when you walk around. If you weren't paying attention you wouldn't even notice it.

Probably a minor rounding or interpolation issue in our panorama code.

@carstene1ns

This comment has been minimized.

Copy link
Member

carstene1ns commented Dec 7, 2018

Is #961, unfortunately images and video offline, however when loading the game, you will know why I mentioned it ;)
https://easyrpg.org/play/master/?game=embric&start-map-id=89&start-party=1&start-position=40%2060

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

Panoramas also have incorrect starting offset for looping maps.

pano

This is the starting position on the same 41x31 map, set to loop on both dimensions.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

Regarding the second issue:

When the map loops horizontal or vertical.

When you enter the map the panorama gets fixed in the looping dimensions. The position of the panorama is different depending on which place you start on the map, but it doesn't change after that.

Walk far away, then save your game. If you load your game, the panorama stays in it's position. If you change the new game position to the same tile as the save game and start a new game, the panorama offset is different than your loaded game.

This means the save game data must be storing some way to get the panorama offsets for looping maps. Maybe SaveScreen::pan_ ...?

Confirmed SaveScreen has no effect on this by manually removing it from a save and loading.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

Here are what the starting positions are in RPG_RT

Map (41,31) Start at (30,23)

pan_start

  • Upper Left: no loop
  • Upper right: horiz loop
  • Lower left: vert loop
  • Lower right: both loop
@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

So I've figured it out. Looks like an RPG_RT save game bug.

When you have a looping map

  • New game -> panorama fixed to (map_x / 2, map_y / 2)
  • Teleport to map -> panorama fixed to (map_x / 2, map_y /2)
  • Load saved game -> panorama fixed to (0, 0)

Loading a saved game at the same position:
pansave

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

@CherryDT

Another RPG_RT bug for you.

@CherryDT

This comment has been minimized.

Copy link

CherryDT commented Dec 10, 2018

Hm but this is simply a non-saved panorama position, and the panorama object is initialized to 0, 0 (otherwise only gets changed when switching maps). So if I get this right, it's what was fixed in RM2k3E (#1485)

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

I'll check the behavior on rm2k3e. I thought it was only for scrolling panorama but maybe it applies here too.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 10, 2018

Reopening this until I verify save data in rm2k3e

@fmatthew5876

This comment has been minimized.

Copy link
Contributor Author

fmatthew5876 commented Dec 11, 2018

rm2k3e correctly loads the pan position for looping map. Actually it looks like rm2k3e uses the pan variables for everything, even on non-looping maps it writes out the chunks.

Guess its time to refactor panorama again...

@fmatthew5876 fmatthew5876 referenced this issue Dec 18, 2018

Merged

More panorama fixes #1554

7 of 7 tasks complete

@Ghabry Ghabry closed this in #1554 Dec 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.