Hide "invalid sound position/velocity" messages

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: Developers

Re: Hide "invalid sound position/velocity" messages

Postby phantombeta » Sun Jul 29, 2018 12:19 pm

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
phantombeta
In the meadow of sinful thoughts, every flower's a perfect one
 
Joined: 02 May 2013
Location: The United Soviet Socialist Dictatorship of Hueland
Discord: phantombeta#2461
Twitch ID: phantombeta_

Re: Hide "invalid sound position/velocity" messages

Postby Graf Zahl » Sun Jul 29, 2018 12:34 pm

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Hide "invalid sound position/velocity" messages

Postby Kinsie » Sun Jul 29, 2018 8:33 pm

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
Kinsie
A Concept Utterly Obsolete
 
Joined: 22 Oct 2004
Location: MAP33
Discord: Find Me...
Twitch ID: thekinsie

Re: Hide "invalid sound position/velocity" messages

Postby Arctangent » Sun Jul 29, 2018 10:52 pm

I have to wonder why sound has issues with being out of bounds when actors don't to begin with.
User avatar
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: Hide "invalid sound position/velocity" messages

Postby Hypersonic » Sun Aug 05, 2018 9:25 am

"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.
Hypersonic
 
Joined: 14 Aug 2017

Re: Hide "invalid sound position/velocity" messages

Postby Enjay » Sat Aug 11, 2018 7:26 pm

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 allExpand view
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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Hide "invalid sound position/velocity" messages

Postby Marisa Kirisame » Sun Aug 12, 2018 5:37 am

I've seen in the past that actors with a really small radius and/or height break collision.
User avatar
Marisa Kirisame
ZScript Magician
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: Marisa Kirisame#4689
Twitch ID: magusmarisa

Re: Hide "invalid sound position/velocity" messages

Postby Enjay » Sun Aug 12, 2018 6:01 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Hide "invalid sound position/velocity" messages

Postby Arctangent » Sun Aug 12, 2018 6:55 am

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
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: Hide "invalid sound position/velocity" messages

Postby Enjay » Sun Aug 12, 2018 7:06 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: Hide "invalid sound position/velocity" messages

Postby Arctangent » Sun Aug 12, 2018 7:25 am

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
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: Hide "invalid sound position/velocity" messages

Postby Matt » Mon Aug 13, 2018 8:15 pm

It's because of problems like these that I've used FastProjectiles or homebrewed equivalents almost exclusively now...
User avatar
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Hide "invalid sound position/velocity" messages

Postby Graf Zahl » Tue Aug 14, 2018 1:08 am

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
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Hide "invalid sound position/velocity" messages

Postby Matt » Tue Aug 14, 2018 2:18 pm

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
Matt
Putting the XD into *xdeath since 2007
 
 
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Hide "invalid sound position/velocity" messages

Postby Graf Zahl » Tue Aug 14, 2018 2:31 pm

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

TryMove does *NOT* check the movement path but only the destination location.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

PreviousNext

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests