sekaiproject / ponscripter-fork

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

Problem with text skipping #16

Open MMazzuca opened 10 years ago

MMazzuca commented 10 years ago

Holding CTRL when starting a chapter in Side 2nd causes the text to keep skipping after CTRL is released. The text will continue to skip until the game is closed, even upon returning to the title screen and picking Narcissu. This is on the Windows version. My specs are:

CPU: Intel Core i7 3770 3.4 GHz GPU: ATI AMD Radeon HD 7800 RAM: 16 GB OS: Windows 7 64 bit

I made a short video (about two minutes) demonstrating it, which can be seen here. https://dl.dropboxusercontent.com/u/44528851/Narcissu.avi

dobacco commented 10 years ago

if you start a chapter, click though a few lines, then hold ctrl and then release ctrl does it still keep skipping forever?

euank commented 10 years ago

You can consistently reproduce this? On a windows computer, just holding ctrl from the title screen and starting a narcissu2 chapter didn't trigger it for me.

Also, try seeing if pressing 'a' or 's' has any effect after it begins. The bit at the end when you're not holding ctrl, where it plays more slowly, looks a lot like the 'autoplay' mode you can toggle with 'a'. 's', similarly, toggles the 'skip' mode that holding ctrl gives you..

Hopefully we can track down why this is happening.

Jadomonkey commented 10 years ago

It seems to be an issue with how long CTRL is held. I'm able to replicate it in 2nd by holding CTRL from the very beginning to about the part with the car in the garage, but if I release much sooner than that, the problem doesn't occur.

It also seems to occur the same way in 1st.

MMazzuca commented 10 years ago

I'd say it's reproducible about half the time. I've been able to get it to happen on both games now. Still not 100% sure what causes it besides skipping text as the chapter loads.

Jadomonkey commented 10 years ago

I've been able to get it to happen 100% of the time as long as it's held for long enough. Testing this from just before a chapter change causes no issue.

Interestingly, CTRL function mapped to devices such as a controller works as intended. It stops skipping as soon as you release the button and it automatically pauses at (most) new chapters. The issue seems to be specific to CTRL from the keyboard.

Jadomonkey commented 10 years ago

OK, able to replicate the issue the same way on both Win 7 and Vista systems (This is an example of how long the key must be held to cause the issue, but other sections of either game can manifest the issue as long as the CTRL key is held long enough):

From the very beginning of 2nd: skipstart Press the CTRL on the keyboard and hold until this scene: skipdanger and after releasing CTRL, the text will continue to skip for a while, but then eventually slow down and autoadvance at intermittent speeds as in the original post. Releasing it earlier than this or otherwise holding CTRL through chapters will not cause the issue.

When holding the CTRL key for too long, the game seems to be cuing up individual strokes and this causes problems even outside of the issue as text will continue to skip for a while after the key is released. As I mentioned, CTRL mapped to a controller button through JoytoKey, the CTRL button on the Tablet PC Input Panel in both Vista laptop and Win 7 desktop and CTRL mapped to a button on my Cintiq do not produce the same results as the keyboard key.

Yirba commented 10 years ago

After holding down Ctrl for a few seconds and it continues skipping for a while, the S key stops working (only advancing the text like the spacebar). This also occurs if you press the S key, click, then press the S key again.

DanielOaks commented 10 years ago

I'm thinking this is probably because the PonscripterLabel::keyPressEvent code in PonscripterLabel_event.cpp assumes a keydown for most keypresses, and in the case of a few like Ctrl it may mess up our state. I'm looking into it, and will post if I find anything weird.