Hide "invalid sound position/velocity" messages

Moderator: GZDoom Developers

User avatar
phantombeta
Posts: 2104
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Hide "invalid sound position/velocity" messages

Post by phantombeta »

Marisa Kirisame wrote:That's one big difference with UE1. At least it had a concept of "out of bounds" (and it was very aggressive in enforcing it).

I wonder just how hard it'd be to figure out a way to detect when things are really outside of any sector.
The easiest way would be to get the actor's current sector* and check if the actor's current position/center is inside the sector's polygon. That will only check the actor's center, but should be enough.
I'm using the algorithm from this StackOverflow answer in my mod.
Of course, such a method isn't perfect, and probably has some edge cases, but way better than nothing.

* This exploits the fact that an actor is always inside a sector.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49098
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Hide "invalid sound position/velocity" messages

Post by Graf Zahl »

With a sector this won't work that well. But with a subsector it's a lot easier and all you need to do is check the actor against all one-sided lines of the subsector.
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Re: Hide "invalid sound position/velocity" messages

Post by Kinsie »

Also, going back here:
Hege Cactus wrote:also why the does the engine even still make it run if its 32K outside the map/last used linedef? Even basic game engines have "out of bounds" check to destroy an object that goes way way outside the bounds :V
I don't think anybody would cry too many tears if any non-player actor that left the map boundries got automatically deleted.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: Hide "invalid sound position/velocity" messages

Post by Arctangent »

I have to wonder why sound has issues with being out of bounds when actors don't to begin with.
Hypersonic
Posts: 134
Joined: Mon Aug 14, 2017 3:04 pm

Re: Hide "invalid sound position/velocity" messages

Post by Hypersonic »

"Doom does not know the concept of 'outside any sector'. Any valid point inside the map boundaries belongs to some subsector and as a consequence to some sector."

This explains why when you're next to a sector with slime (but don't appear to be in any sector) you take damage. It would be interesting to show a sector's true extent with some faint lines, especially for slime sectors, so you can avoid them when nocliping around the map.
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Hide "invalid sound position/velocity" messages

Post by Enjay »

Just got a few of these messages myself. As far as I'm aware, I didn't do anything wrong as far as item placement and so on is concerned.

I was using the Stronghold sentry gun and was just sitting back watching the gun deal with a bunch of bad guys when I started getting error messages at the top of the screen.

e.g.

Code: Select all

invalid sound position (-37717.851562, -3600.458717, -328.046570) for actor of class sentry plasma
Presumably some of the plasma balls were passing through the walls, somehow, getting into the void and then carrying on until they tried to make a sound (death sound? - though they can't have hit anything). Problem is, I don't think I can do anything about this from a mapping perspective.

[edit] I just watched the same thing but I was at the automap with cheats enabled. Sure enough, the sentry plasma was getting through the walls quite a bit. Checking the DECORATE for it, it has a radius of 1 and a speed of 20 but does not inherit from FastProjectile. Presumably, remaking it to inherit from FastProjectile would help prevent the projectiles passing through the walls. However, I'm still unsure if a) that would cure the problem 100% of the time and b) how valuable the error message is in a case like this. Although, I suppose it has flagged up a potential improvement in the actor definition. [/edit]
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Hide "invalid sound position/velocity" messages

Post by Marisa the Magician »

I've seen in the past that actors with a really small radius and/or height break collision.
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Hide "invalid sound position/velocity" messages

Post by Enjay »

Yup, that's been a thing forever - probably right back to people dehacking Doom projectiles to be tiny. Inheriting from FastProjectile usually cures problematic actors if the radius needs to be particularly small for whatever reason.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: Hide "invalid sound position/velocity" messages

Post by Arctangent »

Enjay wrote:Yup, that's been a thing forever - probably right back to people dehacking Doom projectiles to be tiny.
Before even that - it happens with imp fireballs while on Nightmare, and mancubus fireballs on any difficulty!
User avatar
Enjay
 
 
Posts: 26537
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Hide "invalid sound position/velocity" messages

Post by Enjay »

Interesting. I see that the Mancubus projectile also has a speed of 20. I guess it's around about that value that collision with certain 1s wall starts failing.

Question is, if a mancubus fireball passes through a wall and keeps going, can it get outside the maximum map size and, if it does, will it cause one of these messages when/if it dies? If so, i guess this message could even pop-up on Doom2 IWAD maps.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: Hide "invalid sound position/velocity" messages

Post by Arctangent »

Enjay wrote:Interesting. I see that the Mancubus projectile also has a speed of 20. I guess it's around about that value that collision with certain 1s wall starts failing.
Actually, it has less to do with the speed and more to do with the fact that its 6 radius gives it a total horizontal hitbox size of 12, which means there's 8 units it moves each tic that are just completely skipped by its collision checks. Bump it up to 10 radius and it'll suddenly stop skipping walls entirely.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Hide "invalid sound position/velocity" messages

Post by Matt »

It's because of problems like these that I've used FastProjectiles or homebrewed equivalents almost exclusively now...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49098
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Hide "invalid sound position/velocity" messages

Post by Graf Zahl »

Arctangent wrote:
Enjay wrote:Interesting. I see that the Mancubus projectile also has a speed of 20. I guess it's around about that value that collision with certain 1s wall starts failing.
Actually, it has less to do with the speed and more to do with the fact that its 6 radius gives it a total horizontal hitbox size of 12, which means there's 8 units it moves each tic that are just completely skipped by its collision checks. Bump it up to 10 radius and it'll suddenly stop skipping walls entirely.
Not correct. If the movement speed is larger than the radius the move will be split, but once the radius falls below a certain threshold, the entire movement logic becomes slightly erratic. This is some really, really bad code and not how movement should have been implemented.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Hide "invalid sound position/velocity" messages

Post by Matt »

Graf Zahl wrote:...but once the radius falls below a certain threshold, the entire movement logic becomes slightly erratic.
Does this apply to TryMove as well? I've always had trouble with certain checks with very small actors where the numbers suggested nothing was wrong.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49098
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Hide "invalid sound position/velocity" messages

Post by Graf Zahl »

You need to be extra careful when calling this directly..

TryMove does *NOT* check the movement path but only the destination location.

Return to “Closed Feature Suggestions [GZDoom]”