07th-mod / ponscripter-fork

Fork of the Ponscripter visual novel engine to take advantage of SDL2 and improve Steam integration
GNU General Public License v2.0
15 stars 4 forks source link

Umineko EP1 credits don't display properly on new .exe #6

Closed drojf closed 2 years ago

drojf commented 3 years ago

We had a report (which I haven't verified yet) that the EP1 credits doesn't display properly.

i jsut wanna let you guys know after the mai ngame credits the text thats suppsoed to be there isnt with that new exe which is a big problem imo originally i thought the text was on an image

image

is it because ofd how the framrate is been reduced or soemthing causding it to end early>?

i had to downalod a video of the credits for him in order to see it al it just cuts off right after that

When I was working on the mod, I had to add some custom logic to display the ending credits so that it wouldn't lag on older computers (previously it would scroll slower/laggier on older computers). My guess is that logic doesn't work on the new exe due to slight differences in the .exe behavior, or perhaps even it running too quickly and my code not accounting for that. I may be able to fix it just by changing the script (and make it work on both .exes)

The EP1 credits image is Umineko\en\bmp\background\efe\end_1a.png


We've also had reports that the achievements don't work, but I tested it on my own computer and they seem to work fine. It may just be an existing problem with Umineko / their computer causing that issue. But something to watch out for. Achievements aren't that critical anyway.

drojf commented 3 years ago

I've identified the "problem" to be the the getspsize function. On the old EXE, the getspsize function would return the actual size of the sprite, however on the new EXE, it returns 1/2 the sprite size. eg for a 1920x1080 image, the old exe would return 1920x1080, and the new exe would return 960x540.

For the credits, this results in the credits only scrolling halfway.

The Umineko game script does use this function in a couple places, for example the mldt function (meta load sprite?), used to display sprites on top of the other sprites, or just to draw them transparently.

Old exe:

image

New exe:

image

I'm not really sure what is the correct behavior, or why this difference exists at all, but the Umineko script certainly expects the old behavior.

I had a look at the getspsize function:

https://github.com/07th-mod/ponscripter-fork/blob/fd57193d34d0d025fecf281da8922b086cf9793f/src/PonscripterLabel_command.cpp#L2286-L2302

and would guess it was one of the commits related to https://github.com/07th-mod/ponscripter-fork/commit/d784b085e3025f11ba03a86fee885fe0bfeff5d8 or https://github.com/07th-mod/ponscripter-fork/commit/ba298505f89f78166b19b4a9d7a867841ec5d3f3 which changed the behavior, but it could also have been a change from elsewhere. If this exe definitely works fine on other games, my guess is it was changed a long time ago.

drojf commented 3 years ago

It appears that it was d2b5d190477c0b32bd0aca87972a5c047c1ef451 and 7bb16e373476d76d677e9b81a5411267ff3b2bbd which caused this issue.

The commit (d2b5d190477c0b32bd0aca87972a5c047c1ef451 ) added "Partial 2x mode"/Umineko mode, which changes the behavior of some functions to before 7bb16e373476d76d677e9b81a5411267ff3b2bbd ("Starting post-release fixes", looks to be lots of small fixes to the engine). If this mode is not enabled, the fixes made to Ponscripter after the release of Umineko cause some graphical artifacts.

The problem appears to be that the getspsize function was missed when adding partial 2x mode.

To fix this, I just repeated the same change in the getspsize function that was already made in the parseTaggedString function in d2b5d190477c0b32bd0aca87972a5c047c1ef451.

After re-testing, this appears to fix the issue (both the credits and metaworld sprite), but I'll wait upon our playtester to play some more Umineko before I close this issue.

NOTE: loading saves which were made on older .exes cause the normal sprites to be shifted - I think this is because the old getspsize values are saved in some persistent variables. I'm not sure if they will fix themselves at some point if you play long enough, but please keep this in mind if you're trying to test if this issue is fixed or not.

drojf commented 3 years ago

I think this can be closed now, given that the same playtester played up to near the end of Ep4 without encountering this issue.

They did have a non-reproducible crash at a particular animation sequence, but at least this particular issue is resolved, as of https://github.com/07th-mod/ponscripter-fork/commit/c39f7284475eec273796feac53fecf6debe70392.

drojf commented 3 years ago

I haven't actually merged this into the main mod branch yet...close when this is merged