Frictional Games Forum (read-only)
Error: "-1.#.ND" ? What? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Error: "-1.#.ND" ? What? (/thread-21587.html)



Error: "-1.#.ND" ? What? - Daemian - 05-23-2013

Hello ppl,
I'm getting a strange bug when i walk the player over rocks.

Suddenly the screen goes black, the darkness tip appears "don't stay on darkness" and then you die.
After you respawn, the screen is still black and you can't use the lantern.

Then, for some reason, if you don't quit the game fast, your cpu usage increases to 100% in about 5 seconds.

This only happens when you walk over rocks, not all the time, but it happens once in a while.

I thought i was just falling off the map, but
when this bug happens the Y speed goes to a strange value: -1.#.ND
Instead of -30 or something.

Maybe the custom entity is the problem?

[Image: 2yl7bzc.jpg]

Thank you.

oh, and in-game this rocks are set to Static.
And size 5.0. So, big.


RE: Error: "-1.#.ND" ? What? - Bridge - 05-23-2013

Perhaps something is wrong with the bounding box or the some other way in which the rocks interact with the environment. I can't explain the darkness or Y coordinates but if all of the CPU is being used up it is probably an infinite loop due to a bug in the hit detection.


RE: Error: "-1.#.ND" ? What? - palistov - 05-25-2013

The -1#ND thing has to do with floating point limits I think. You're probably flying down very fast. See, it looks like you have two bodies on your entity there, right? Only use one. The player is likely colliding between two of them at the same time when walking over the rock and accumulating an extremely high force from the bodies trying to push the player out of them both at the same time. Then you fly off and die because there is a minimum Z value you have to have to play.

Edit: For a rock like that you don't even need it to be an entity, you can just load it into your map through the editor as a static object. The engine constructs a collider from the mesh for you, so you can walk over it.


RE: Error: "-1.#.ND" ? What? - Daemian - 05-27-2013

(05-25-2013, 11:43 AM)palistov Wrote: The -1#ND thing has to do with floating point limits I think. You're probably flying down very fast. See, it looks like you have two bodies on your entity there, right? Only use one. The player is likely colliding between two of them at the same time when walking over the rock and accumulating an extremely high force from the bodies trying to push the player out of them both at the same time. Then you fly off and die because there is a minimum Z value you have to have to play.

Edit: For a rock like that you don't even need it to be an entity, you can just load it into your map through the editor as a static object. The engine constructs a collider from the mesh for you, so you can walk over it.
Yep, that's what i think too.
Nobody is absolutely sure, but that's probably the reason.

I'm gonna try that static object idea, though i thought that two round circles were better for performance than having the game loading the exact shape of the object. Am i wrong?

In fact, performance was the reason why i did this custom rock.
I need a lot of rocks in this particular map so i had to edit some stuff and remove others. And the difference is really significant.


RE: Error: "-1.#.ND" ? What? - palistov - 05-27-2013

Performance shouldn't be an issue either way. Computers are very fast. When you take things to the extreme is when performance starts to suffer. So if you're placing like 10k of these rocks to try and create a cave or something, that's when performance starts to matter.

But yeah, the player instantly dying because of a bizarre physics interaction is a big issue D:
Using the static should resolve your issue, I've never died from walking over a rock before Smile


RE: Error: "-1.#.ND" ? What? - Daemian - 05-28-2013

Good stuff, i'm getting the same fps using static rocks.
Downside is i can't have them floating around, or have the player move any for puzzles.
So i'm using both static and entities to solve this, i think >40 fps i ok, right?

Windowed, 1440x900
stable 40~50 fps

[Image: asdasdsafas.jpg]( The floating rocks are moving)


RE: Error: "-1.#.ND" ? What? - palistov - 05-28-2013

Well if you want them to be dynamic and such you can make them entities again, but use a single body for it. Make it a capsule shape or even a cylinder. It doesn't need to match the mesh exactly, the player will have a hard time noticing the inconsistency.