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

Support proper rendering of Sprites at map borders of looping maps #1541

Merged
merged 2 commits into from Dec 23, 2018

Conversation

Projects
None yet
4 participants
@Ghabry
Copy link
Member

Ghabry commented Dec 8, 2018

Alternative to d11a906 as you can see my solution is a bit simpler ;).

This depends on #1498 because the Screen scroll changes/fixes made it much easier to implement this.

Test case: https://easyrpg.org/play/pr1541/?start-map-id=44

Ghabry added some commits Dec 8, 2018

Correctly render sprites on looping maps by emitting "clones" which a…
…re duplicated a X, Y and XY depending on the map panning.

Fix #1216

@Ghabry Ghabry added this to the 0.6.0 (likely) milestone Dec 8, 2018

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Dec 8, 2018

RPG_RT glitch exhibition (I altered the map slightly because I needed to test z-layering and added a vehicle):
I don't emulate them, everything works as expected in my PR ;)

For reference: That's the map

1-fs8

When I scroll the map this way the z-layering between airship (the arrow) and the sprites around becomes messed up and the staircase dissapears

2-fs8

Same as previous, just with the map fixes, so that the staircase stays invisible (but still works)

3-fs8

The "nose" of the vehicle is not wrapped

5-fs8

When you move in the airship to the most-bottom row the vehicle dissapears and the shadow is not wrapped to the top.

failpan

The same applies at the right-most map border.

failpan2

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

fmatthew5876 commented Dec 8, 2018

Nice work Ghabry 👍

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Dec 8, 2018

Well most of the thanks goes to your new scrolling code because without it my code will result in strange scroll locks independent of the pan configuration.

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

fmatthew5876 commented Dec 8, 2018

Thats good, I guess we could say this work constitutes a review of the new panning code.

@Ghabry Ghabry force-pushed the Ghabry:sprite-clones branch 2 times, most recently from 076e3a8 to 79efc99 Dec 9, 2018

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

fmatthew5876 commented Dec 11, 2018

This will need a retest after #1554 is done.

@Ghabry Ghabry force-pushed the Ghabry:sprite-clones branch from 79efc99 to 60fec0b Dec 12, 2018

@fdelapena fdelapena removed the Needs Rebase label Dec 12, 2018

@carstene1ns

This comment has been minimized.

Copy link
Member

carstene1ns commented Dec 13, 2018

@fmatthew5876 Do you think this will be affected by panorama code? IMO this might have artifacts if scrolling is wrong, but generally should be fine, as only uses player/event/vehicle positions...

@fmatthew5876

This comment has been minimized.

Copy link
Contributor

fmatthew5876 commented Dec 13, 2018

The change that fixes the huge offset getting passed to Game_Map::Scroll() when you cross map border could affect this PR maybe? The map position still worked even with that bug present so it's probably ok. I would retest this with the panorama branch to be absolutely sure.

@Ghabry Ghabry force-pushed the Ghabry:sprite-clones branch from 60fec0b to b125931 Dec 22, 2018

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Dec 22, 2018

Only rebased, don't merge yet. Have to chekc if this still works and can be maybe simplified now with the new scroll code.

@Ghabry

This comment has been minimized.

Copy link
Member Author

Ghabry commented Dec 22, 2018

Everything still works as is and don't think this can be reduced further.
So can be merged now.

@carstene1ns carstene1ns merged commit f07e49e into EasyRPG:master Dec 23, 2018

7 checks passed

Android (armeabi-v7a) Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Wii (SDL1) Build finished.
Details
Windows (x64) Build finished.
Details
Windows (x86) Build finished.
Details
web Build finished.
Details

@Ghabry Ghabry deleted the Ghabry:sprite-clones branch Jan 3, 2019

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.