[Suggestion][Player] Don't amplify the "Yippie!" sound for multiple exiters

Started by IchoTolot, August 02, 2018, 05:45:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchoTolot

I just watched a replay today where a 90 lem cluster exited the same time ---> earrape via a nextremely loud "Yippie!".

Even with only 5 lems or so the sound can be kinda unnessesary loud.

Suggestion: Regardles of the number of lems exiting at the same time just play the normal "Yippie!" sound or stop the amplifying already at ~2 lems. That also counts for a lemming train exiting right behind each other and the sounds overlap.

Nepster told me he doesn't know about the how that lem entering sound works.

@namida: Could you mabe give some insight here on how to edit this? ???

nin10doadict

I've also noticed that I tend to get a lag spike when huge numbers of Lemmings exit simultaneously.
I know I've played some other Lemmings game where this didn't happen, nor did the amplified/stacked sound effect, though I can't remember which engine it was...

namida

If I remember correctly, NeoLemmix queues the sounds while calculating physics during a frame, then plays them at the end.

A fix should thus be as simple as, before actually playing the sounds in the list, remove any duplicates. (This is what's actually happening - the sound is being played multiple times when multiple lemmings exit in the same frame.)

@Nepster: If this doesn't help, let me know and I'll take a look at the actual code.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Quote from: namida on August 03, 2018, 01:54:16 AM
before actually playing the sounds in the list, remove any duplicates.

:thumbsup:

You can remove both the queued and the still-playing duplicates from earlier frames.

-- Simon

namida

QuoteYou can remove both the queued and the still-playing duplicates from earlier frames.

This would need a somewhat significant amount of change to the sound code. Currently, with the exception of the music, sounds played are pretty much "play and forget" - once the queue has been handled, NeoLemmix has no memory of either what sounds have been played, nor any reference by which it can stop them.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

GigaLem

I'm not sure if this is possible, but have a different sound if 5+ lemmings enter at the same time

ccexplore

namida's fix for ensuring only one (or at least some hard maximum) "yippie" per frame even if there were multiple exiters on same frame is a good start for the worst case.  For the case of multiple yippies very close together but on different frames, maybe see if the APIs used for sound playing has some mode where a new sound being played will stop any already-playing sounds.  Then it'll just sound like yi-yi-yi-...-yippie without overlapping each other.

IchoTolot

Maybe even change the "Yippie!" to the Lemmini "Boing!" as this could be a bit less pushy ???

Ryemanni

Quote from: IchoTolot on August 03, 2018, 08:14:59 AM
Maybe even change the "Yippie!" to the Lemmini "Boing!" as this could be a bit less pushy ???
I'm heavily against this. You could always make it into an option or let the player change the sound effects themselves, but I'll never let go of the 'Yippie'. :P

nin10doadict

I find it satisfying when there's lots of lemmings entering at once but spaced out by a frame or two to get the staggered yi-yi-yippie effect.
Taking namida's suggestion to remove duplicates from the sound queue on each frame would solve the "overly loud volume" problem and from the sound of it wouldn't be terribly hard to do. I support this suggestion.

IchoTolot

I was reminded of this topic in on one of my Lemmings videos.

So are there any plans for a change now? ???

namida

Quote from: namida on August 03, 2018, 04:55:18 AM
QuoteYou can remove both the queued and the still-playing duplicates from earlier frames.

This would need a somewhat significant amount of change to the sound code. Currently, with the exception of the music, sounds played are pretty much "play and forget" - once the queue has been handled, NeoLemmix has no memory of either what sounds have been played, nor any reference by which it can stop them.

I will clarify on this - it is not impossible for NeoLemmix to get such a reference, it just currently does not do so. However, I suspect that simply removing duplicate sounds on the same frame will be sufficient to resolve this issue to most users' satisfaction.

I also notice that the zombie sound is limited to one play at a time, so perhaps the code around that could serve as a useful starting point for how to implement that instead.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Crane

One thing I suggested on the video in question (was it "From the Brink"?) is to restart the sound clip instead of overlapping them, akin to what the earliest versions of Lemmings did. That way, only one "Yippee!" is played and the game doesn't suffer from a significant lag spike.

Dullstar

I think preventing the sound from playing more than once on the same frame is definitely a change that should be implemented. I think I'd have to hear the effects of allowing Yippees on different frames to overlap vs. restarting to decide which I like better, but from what I understand it sounds like overlapping is probably simpler.

I do think it is important that, if a Yippee is currently playing, and any number of lemmings exits on the same frame, a new Yippee should be triggered. I think it would sound weird if one Yippee had to fully complete before another can be triggered.

Nepster

I now implemented the easiest solution (at least code-wise): On each frame, play every type of sound at most once.