Web: https://easyrpg.org/play/master/?game=issue-1169
Hi, our main coder prepared a mini-demo of two problems we are experiencing in Easy RPG only. The issues are:
1) ChipSet: in the map there is a column with a hole inside. The column appears withuot holes in RPG Maker. The hero of the mini-demo will show you the bugged column (which is part of a ChipSet) while you play it;
2) Battle positioning: in our game we implemented a FaceSet Animation System. We don't use static FaceSets but we do use Battle animations to see them moving (mouth, eyes, etc). In the mini-demo the hero will talk for the first time and the animated FaceSet will appear in the right position (in its box of our text message picture). Then if you walk to the right, after the column, the game will take control of the hero, change the camera displacement and then move the hero upwards. He will talk again and this time the animated Battle of the FaceSet will not appear in the box. THIS DOES NOT HAPPEN IN RPG MAKER. To show the animated Battle of the FaceSet, throughout our game we use Event 0001 of every map as its target. Of course this event need to be repositioned every time we open a new message box, expecially in big maps, in order to see the animation played inside the box. This repositioning is performed by a parallel process (Common Event number 894, you find it in the test case). In RPG Maker this algorith always work, in any map and in any condition. In Easy RPG the result of the calculation is wrong because the Battle appears in different, wrong, positions (not in the message box). We are experiencing this problem in big maps, the ones which left the DEBUG message "Image size out of the boundary" in the Easy RPG log.
Please check the mini-demo and let us know where the differences with RPG Maker are and if you can fix them.
Thank you!
Really nice testcase :)
1 is caused because the tile for the event is the very first one in the tileset (tile_id is 0) and we assume that the first tile is always fully transparent. A simple patch to Sprite_Character should fix this.
I second this. Great testcase. Usually we don't get such detailed reports :)
And battle animations for FaceSets is smart.
After the panning EasyRPG populated the variables that receive ScreenXY and HeroXY incorrectly.
RPG_RT:
SY176
HX71
HY12
EasyRPG:
Screen X: 152
Screen Y: 180
Hero X: 69
Hero Y: 14
ACtually the pan is wrong, too:

Hi guys, I'm Tux, main coder of this game. I write because there is something strange... On EasyRPG (Android) I don't see the camera/pan like Ghabry (his image on the right). I see it exactly like the image on the left (which I guess is RPG_RT), but without the animated FaceSet ...
hu, that's even more strange. o.O
This is how I see it on my Galaxy S7 (EasyRPG - Android).

This is my screen with apk of issue 1165. Galaxy S8

You are right. I get the same result as you now. No idea what went wrong when I made the screenshot.
But the Pan is still wrong in EasyRPG (and I guess this is the problem because you use an event to position the battle animation/faceset so when the screen is misaligned this will just not work)
Here is a screenshot from the editor which shows the tile-grid:
A Pan command can only move in "number of tiles".
Here is the screen after the pan command:
As you can see the EasyRPG screen is misaligned and not on the tile grid :(
I see...so I guess that the solution for this won't be easy :(
As for the ChipSet problem, instead, you are already fixing it, did I get it right?
ChipSet problem: We don't give estimates when we fix some issues but that one appears simple to fix.
Thank you!
Keep us posted about both issues :)
Ghabry, there's a diagonal row of events on the steps that trigger the hero to walk down into the arena and where you end up depends on which of these events you touch. You just touched a different one to get to different places. This is actually important. If you touch the top-most one, the face doesn't get displayed incorrectly! This is a hint, because it's also the only one where the pan never goes below the bottom edge of the map.
Here's what's wrong. The way we update the scroll is (looking only at the x direction)
if (last_pan_x != current_pan_x) {
ScrollRight(current_pan_x - last_pan_x);
last_pan_x = current_pan_x;
}
Now suppose we stand near the right edge of the map and do a pan to the right, wait for the pan to finish, then reset the pan, and wait for the pan to finish. In RPG_RT, the screen doesn't move. In Player, this will do a bunch of ScrollRight(...)s followed by a bunch of ScrollLeft(...)s which would normally cancel out. But because we're at the right edge of the map, the ScrollRights don't have any effect, because we don't move over the right edge, so there's nothing for the ScrollLefts to cancel out, so the net effect is to move the screen position to the left. So when the pan goes off screen, and then comes back on, we mess up the screen position.
I'm not quite sure why the tiles wind up misaligned though...
To compare, Game_Player::Center puts the screen at the right place but doesn't handle scrolling the BG or the hero walking. Using it does get the face to show up in the right place though.
I'll try writing up something to fix this later.
Anyone know what the StartScroll, UpdateScroll, &c. stuff in Game_Map is supposed to be for? grep StartScroll src/*.cpp returns only the definition. I checked out the commit from when they were last touched (6 years ago) and they didn't seem to be used then either...
Anyone know what the StartScroll, UpdateScroll, &c. stuff in Game_Map is supposed to be for?
Nope, most of the map code is a mistery to me. I think glynnc wrote most of it :D
Can you attach to us a version of easyrpg including patches to test it? Apk and Windows. Thanks very much
Well, I deleted it all :)
I'll PR this branch after I do some more testing (taking bets for number of regression _this_ time ;))
When you open the PR I will make some tests on the TestGame looping Pan map because there were many rendering bugs (events missing) when you panned over the map border.
Another test candidate: The Wolfenhain boat minigame (misaligned by 1 tile)
That's would be awesome, thanks :)
The boat minigame appears fixed (funny glitch btw).
Yepp can also confirm that both bugs are fixed. But the Pan test-map has a new bug (I think, not checked against RPG_RT):
One event invokes "Fix Map" and when you "Unfix Map" with a different event the map jumps directly in the middle. I think in RPG_RT the map stays at the fixed position and "unfixes" when the player scrolls the map.
So always centering the screen doesn't work with the "Fix Map" stuff, so I'm giving that up :( I'll PR the fix for the first part first, and do the second one in a different PR, because the second one will probably be harder to review.
Hello guys, I have tested the ChipSet problem using the last successfull nightly build for the Android Player and now the column appears to be in good shape :)
Well done!
As for the second bug (Battle/FaceSet animation not positioned correctly) I understood that the problem is not easy to fix and has a high regression bug risk, so you are taking your time to fix/test.
We well be following this issue, keep us posted as soon as you have some news, thanks!
Most helpful comment
Ghabry, there's a diagonal row of events on the steps that trigger the hero to walk down into the arena and where you end up depends on which of these events you touch. You just touched a different one to get to different places. This is actually important. If you touch the top-most one, the face doesn't get displayed incorrectly! This is a hint, because it's also the only one where the pan never goes below the bottom edge of the map.
Here's what's wrong. The way we update the scroll is (looking only at the x direction)
Now suppose we stand near the right edge of the map and do a pan to the right, wait for the pan to finish, then reset the pan, and wait for the pan to finish. In RPG_RT, the screen doesn't move. In Player, this will do a bunch of
ScrollRight(...)s followed by a bunch ofScrollLeft(...)s which would normally cancel out. But because we're at the right edge of the map, theScrollRights don't have any effect, because we don't move over the right edge, so there's nothing for theScrollLefts to cancel out, so the net effect is to move the screen position to the left. So when the pan goes off screen, and then comes back on, we mess up the screen position.I'm not quite sure why the tiles wind up misaligned though...
To compare,
Game_Player::Centerputs the screen at the right place but doesn't handle scrolling the BG or the hero walking. Using it does get the face to show up in the right place though.I'll try writing up something to fix this later.