scemino / engge

Open source remake of Thimbleweed Park's engine
https://scemino.github.io/
MIT License
148 stars 15 forks source link

When Boris speaks, the sound is heard before the text appears #242

Closed Mac1512 closed 3 years ago

Mac1512 commented 3 years ago

Describe the bug

The problem occurs, since the following problem was corrected:

Lip keeps failing when Boris speaks (https://github.com/scemino/engge/commit/f38cc44c24e9d76b9087b84c57f5d72c3efc90ab)

When Boris speaks, the sound is heard a little before the text appears. and in the part where it gave me the windows exception, which was fixed in that commit, it takes a while to react, engge becomes slow.

This test was carried out in "Release" mode, and outside the Visual Studio environment (The EXE file was loaded directly) .-

To Reproduce

Steps to reproduce the behavior:

  1. You do not have to do anything at all, it is before you can start playing in part 1

Expected behavior

Sound and text are in sync, and engge flows normally

Screenshots NO

Desktop (please complete the following information):

Additional context

For a better clarification of the problem I have uploaded a video to youtube. You can see other problems in the video apart from the one I comment on now, for which I will open new issues.

The link to the video is as follows:

https://youtu.be/Au-fpo3pIGc

This test was carried out in "Release" mode, and outside the Visual Studio environment (The EXE file was loaded directly) .-

scemino commented 3 years ago

Sorry, I don't have this issue, the only issue I have is when Boris says "I could really go for some Wiener Schnitzel after the long walk out here." engge becomes slow because a savegame is created at this time, and it appears that saving a game takes time.

Mac1512 commented 3 years ago

The problem should only occur on windows, although it was generated in the commit:

Lip keeps failing when Boris speaks (https://github.com/scemino/engge/commit/f38cc44c24e9d76b9087b84c57f5d72c3efc90ab)

Before in debug mode it gave the exception, which you corrected in that commit. But in release mode it did not give any exceptions and engge flowed normally. Save the game at the same point. So I think the problem comes from that commit. It is also true that the saving and loading process in debug mode had been slowed down since that correction.

Only two files were changed:

LipAnimation.hpp LipAnimation.cpp

I'll keep an eye on them in case I see something that I can correct.

Note:

(I will delete this note as you read it)

I saw that you were modifying the cmake files. I have finally managed to get cmake to generate a solution for me without having to add the libraries by hand, I have done this in a hard-coded way. Tomorrow I give you my CMakeLists.txt files and other used files, as well as I tell you the rest of my way of compiling. In case you want to make an adaptation to be able to compile better from windows, or give me some correction. My intention is to prepare the files to be able to compile engge for 32 and 64 bit architecture.

scemino commented 3 years ago

Hmm, did you try to run the game in release? Because release mode is optimized, and you're comparing debug with release, it's normal that in debug it's slower than in release.

I didn't understand what you're saying about a note. Can you clarify?

Sorry but I don't understand your problems with cmake files, do you use vcpkg? I should write a page on how building engge on Windows.

About 32bits, I want to drop this version, I'm not sure it's useful to anyone.

Mac1512 commented 3 years ago

Hmm, did you try to run the game in release? Because release mode is optimized, and you're comparing debug with release, it's normal that in debug it's slower than in release.

Yes, in fact the video where I show the problems is running in the version release.

I talked about the debug version, since before when recording it was also fluent in debug, just for that reason.

I didn't understand what you're saying about a note. Can you clarify?

Sorry but I don't understand your problems with cmake files, do you use vcpkg?

The note, I said that I would delete it because it has nothing to do with the problem that is being talked about.

I've been taking a look at vcpkg, I didn't know it existed ... In fact I saw it in one of the CMakeLists.txt but I didn't give it importance, since I think what I saw was that it copied the libraries.

I have generated the solution using an encoding (hard-coded), in the CMakeLists.txt files. And I can compile without problem.

In fact to generate the solution I have used the command:

cmake -A x64 ..

I'll add the architecture in the CMakeLists.txt file, just to write:

cmake ..

But I will look at the vcpkg option, since if I download a commit, with the previous system I must touch all the CMakeLists.txt files and add a findsdl.cmake file, etc.

as I was unaware of the existence of vcpkg, I think that is why I could not generate the solution directly from the downloaded commit and had to do the process described above. That's why I told you to pass you my CMakeLists.txt files to adapt them and be able to compile directly without all those steps.

I'm going to take a look at vcpkg and see if I can generate the solution without any problems.

I should write a page on how building engge on Windows.

it would be great :)

About 32bits, I want to drop this version, I'm not sure it's useful to anyone.

I understand, maybe you're right and no one uses it. What matters is that the 64-bit version works correctly. I see it correct.

scemino commented 3 years ago

OK thank you for the clarifications. I'll have a look of the modifications and try to understand what's going on. I'll try to revert the modifications to see if it's faster on my computer.

Wow, you seem to make a lot of modifications to test my commits, I'll try to create a page about vcpkg as soon as possible.

Mac1512 commented 3 years ago

OK thank you for the clarifications. I'll have a look of the modifications and try to understand what's going on. I'll try to revert the modifications to see if it's faster on my computer.

Thanks for going back and trying, I'll do the same ...

Wow, you seem to make a lot of modifications to test my commits, I'll try to create a page about vcpkg as soon as possible.

Also thank you scemino for the speed in creating a page with the building instructions.

With vcpkg it works great :)

However, I have to create an issue, since it fails with the instructions as you have put them. I will put it as I have done it, so that there is no problem in windows. In case you estimate to change it

Edited:

I have changed a couple of things to make it work, since:

if i do this

git clone https://github.com/Microsoft/vcpkg.git

when I run this line:

vcpkg install sfml:x64-windows freetype:x64-windows glew:x64-windows sdl2:x64-windows glm:x64-windows

will fail in openalsoft, stopping the process:

fallo openalsoft

Then, instead of executing the git clone command, I download the latest stable version of vcpkg, in the address bar of the internet browser I put the following:

https://github.com/microsoft/vcpkg/archive/2020.11-1.zip

then I change this:

cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install

For this:

cd vcpkg bootstrap-vcpkg.bat vcpkg integrate install

I run this:

vcpkg install sfml:x64-windows freetype:x64-windows glew:x64-windows sdl2:x64-windows glm:x64-windows

Clones the repo:

git clone https://github.com/scemino/engge.git

and clones the repo:

git clone https://github.com/scemino/EnggeFramework.git

I copy the content of the EnggeFramework repository to engge/extlibs/ngf

and I do the rest of the instructions.

Tomorrow I will detail it a little better, in case someone who uses windows wants to compile it.

scemino commented 3 years ago

I created the issue #250 for Windows compilation issues as it's not related to this issue.

scemino commented 3 years ago

The problem should only occur on windows, although it was generated in the commit:

Lip keeps failing when Boris speaks (f38cc44)

Before in debug mode it gave the exception, which you corrected in that commit. But in release mode it did not give any exceptions and engge flowed normally. Save the game at the same point. So I think the problem comes from that commit. It is also true that the saving and loading process in debug mode had been slowed down since that correction.

Only two files were changed:

LipAnimation.hpp LipAnimation.cpp

There is not a lot of modifications, I'm not sure it comes from this commit, can you try the commit before, and test the game and then with this commit. The only relevant modification is line 21: if (m_lip.getData().empty() || m_index == static_cast<int>(m_lip.getData().size()))

Are you sure this is this commit which causes this issue ? Thanks for your help.

Mac1512 commented 3 years ago

Sorry for the delay in answering. I've been testing commits for a few hours.

I think the problem was mine, since since I have compiled using vcpkg it has not given me a problem again, it has a small delay, but it is because it saves the game when it says the last sentence.

I have been testing the commit that I thought was causing the problem, the previous one, I have gone down to version release 0.7.0 Beta, I have tried the last commit, Remove Input mappings from README.MD (https://github.com/scemino/engge/commit/9e4e9e8c3e32c49996b9ca97b41da67e7c90b021), etc. And I have to say that the operation is very similar. Sometimes it takes a little while to visualize the line of text (but it is a small time), or it will take a much shorter time to visualize that line of text. As you say, it is because it takes time to save the game.

This leads me to think that I could have changed something that influenced the correct compilation when I recorded the youtube video, since it always failed as in the video. Or, as a result of using vcpkg the problem has been corrected.

Maybe this issue can be closed

Sometimes when Boris is about to say the first sentence, the text is displayed a little behind the sound. In that part engge record something? or create a file?

However, as soon as I can, I will record a video for you to see

scemino commented 3 years ago

Thank you for your tests.