REGoth-project / REGoth

OpenSource-Reimplementation of the zEngine, used by the game "Gothic"
GNU General Public License v3.0
630 stars 63 forks source link

Implement Chapter Notification #347

Closed KirmesBude closed 6 years ago

KirmesBude commented 6 years ago

See Issue #338

This might be better fit as some kind of menu, but there is not scriptdata for chapter notifications as far as I can tell. So because it is just a view, handling input (closing the notification early) and pausing the engine might not be the ideal way to go about it.

Playing the sound is also a little convoluted. For now its good enough, but it should be changed once the audio system gets reworked to include a way to play sounds independently of the World. You could use OpenAL directly, but I dont think that is very elegant.

frabert commented 6 years ago

I noticed that the audio jingle gets played back at low speed, making it kind of funny :) It's worth checking

KirmesBude commented 6 years ago

@frabert So it is working for you? It still does not work for me with the artifact on my windows machine. Compiling it myself on linux works though

frabert commented 6 years ago

What's not working for you? I had to compile your branch by adding the edit #348 to make it not crash on my machine, other than that I get the nostalgic chapter screen when I finish talking to Xardas :)

KirmesBude commented 6 years ago

Well similar to what @tomedi said on gitter, it just does not do anything. Behaves just as the master branch. Not even an output to console that now should always appear after the last commit.

frabert commented 6 years ago

This is using the AppVeyor build, right? Have you tried building it locally?

KirmesBude commented 6 years ago

Yep, using the AppVeyor build on my desktop. I did compile it locally on my laptop and it is working there. I think AppVeyor might not compile quite the right version, though I do not know why.

Regarding the speed of the sound: Is it a significant slowdown?

frabert commented 6 years ago

Sounds about half speed, but it's hard to tell. Definitely enough to be noticeable though EDIT: Probably a sampling rate issue. Most sounds are encoded with a very low sampling rate, maybe the music jingle uses a higher sampling rate

ataulien commented 6 years ago

On my Linux system I hear the in extremo song at half speed too. On Windows everything is fine.

tomedi commented 6 years ago

Just to get it right: we first have to push #348 before your commit works?

ataulien commented 6 years ago

348 has been merged.

frabert commented 6 years ago

It should not influence AppVeyor's behavior though, I don't know what's up with that

frabert commented 6 years ago

I have tried messing a bit with the AppVeyor config, could someone test the artifacts? EDIT: Tested them myself, it works on my machine ™️

KirmesBude commented 6 years ago

Yes, its working now. Can not quite hear the slow speed sound on either my systems. But I will try to replicate it when I have time.

Any input on the points I mentioned in the OP?

ataulien commented 6 years ago

As I mentioned, the slow audio speed exists on my system as well. I even did a video of it because I thought it was funny: https://www.youtube.com/watch?v=xDb-aBs2mx0 :stuck_out_tongue:

Other than the sound issue, can this be merged then? (I think pausing the engine and the way the sound is played is fine until we rework both ui and audio)

frabert commented 6 years ago

I have nothing against it :)