Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: "-1.#.ND" ? What?
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#1
Bug  Error: "-1.#.ND" ? What?

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.

(This post was last modified: 05-23-2013, 11:11 PM by Daemian.)
05-23-2013, 11:05 PM
Find
Bridge Offline
Posting Freak

Posts: 1,971
Threads: 25
Joined: May 2012
Reputation: 128
#2
RE: Error: "-1.#.ND" ? What?

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.
05-23-2013, 11:43 PM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#3
RE: Error: "-1.#.ND" ? What?

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.

(This post was last modified: 05-25-2013, 11:46 AM by palistov.)
05-25-2013, 11:43 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#4
RE: Error: "-1.#.ND" ? What?

(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.

05-27-2013, 05:25 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#5
RE: Error: "-1.#.ND" ? What?

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

05-27-2013, 04:11 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#6
RE: Error: "-1.#.ND" ? What?

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)

(This post was last modified: 05-28-2013, 12:14 AM by Daemian.)
05-28-2013, 12:14 AM
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#7
RE: Error: "-1.#.ND" ? What?

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.

05-28-2013, 10:08 AM
Find




Users browsing this thread: 1 Guest(s)