1. The forum will be closing soon permanently. Please read the announcement here

Note: User registration has been closed. We do not accept any new accounts.

Variable Speed Limits

Discussion in 'Suggestions and Feedback' started by J Kuyper, Jan 13, 2016.

This last post in this thread was made more than 31 days old.
1. J KuyperTrainee Engineer

Messages:
43
I am relatively new to Space Engineers. I was a bit surprised to learn that there is a "speed limit" in space. In fact, it is a very slow speed limit - about the speed of a World War I fighter - not even as fast as a commercial airliner.

So, I did some research. From what I can tell, the speed limit is based on collision detection. The computer looks for a collision with the ship at one point. Then the computer moves the ship, and looks for a collision at the next point. If the ship is travelling too fast, the two points could be on either side of an object. So the ship ends up "flying though" the object. The slower it flies, the closer the points, the more accurate collision detection. Please correct me if I'm missing something. I know this explanation may be simplified.

Here is my thought: We must already know the distance to the nearest object (I'm guessing this is calculated for gravitational forces.) Basically, the closer you are to the nearest object, the lower the speed limit - with a 100 m/s floor. So lets say that a ship is 10,000 meters from the nearest object. It's speed limit would be 2,000 m/s (for example). As it gets closer to the object, the speed limit would become lower until the speed limit reaches 100 m/s. The speed limit would never go below 100 m/s.
In Engineering terms: The Speed Limit function from minimum distance to infinity is the distance to the nearest object multiplied by a factor. The speed limit function from zero to minimum distance is 100 m/s. Since the ship is so far from anything, the computer does not need to detect any collisions.

It might seem strange to artificially slow down as you approach an object. That is the only down side I can think of. Unless, of course, I am missing part of the picture.

What are your thoughts?

• Agree x 1
2. Dragon0GJunior Engineer

Messages:
550
So, what, a ship going insanely fast would just slow down with no indication whatsoever as a result of an unknown force? That would make crashes exceptionally unsatisfying. Perhaps I am simply misunderstanding.

3. MaegilSenior Engineer

Messages:
1,633
Look at the link on my sig, that thread explains why there's this ludicrous speed limit (and how Ken could fix it).

4. PfoApprentice Engineer

Messages:
237
The only things that create gravitational forces are planets / moons and gravity generators. It's very easy to determine how far you are from a planet, the thing is a giant sphere. It's the easiest distance calculation you could ask for. Gravity generators are either a box or a sphere, anything within them is affected by their gravity (well, players or mass blocks).

Finding the closest point between objects, or the distances between all of them, is a bit more involved, and frankly it's better if you don't do this all the time if you don't need to. You would have to constantly scale max speed on a per object basis to try and figure out what speed they should be traveling at to prevent them completely passing through each other, that's a lot and the experience would probably quite often feel less realistic than it does now.

5. extraammoSenior Engineer

Messages:
1,015
I'm not sure how you think relative reference frames would magically make collisions less buggy. Relative reference frames only help with groups of objects that are all going near the same speed in near the same direction. They do absolutely nothing for high speed collisions. The speed limit has to do with collisions and loading of voxels. Floating point errors are what is fixed by relative reference frames, nothing else.

6. YtramXApprentice Engineer

Messages:
238
Agreed. I'm sure the response will be to go look in that thread and all questions will be answered, but I've yet to see a good explanation for what happens when ship X hits ship Y at 5000 m/s either direct, or at an angle. Relative reference frames make a lot of sense in the macro, but the micro details still have unresolved issues. Like how do differences in ship size come into play? What about hitting an extremity of a ship at high velocity? I want high velocity. I put it in the top 3 items I'd like before this game is released. I just don't think RRF are the silver bullet they're believed to be.

• Agree x 1
7. extraammoSenior Engineer

Messages:
1,015
I think it would make more sense to slow down the sim speed when really fast objects get close to each other rather than changing their speed. The side-effect of that being that everyone on a server will feel it when a intense collision occurs in the form of brief slomo.

You could detect high energy collisions by creating a copy of space that only has capsules colliders to represent swept spheres (the estimated space occupation over time). When any capsules collide, their length (proportional to speed) can be taken into account for determining the amount that sim speed needs to be slowed down.

Sorry if this doesn't provide a super vivid image of what I mean.

8. PfoApprentice Engineer

Messages:
237
I know what you mean, I've heard this called "continuous collisions" so that instead of checking two discrete points in time, you check along the entire movement of an object and find the exact time when it would collide. I've seen implementations do this on a per-body basis, so that say only fast moving objects do this sweeping thing. You can turn it on or off at will over time as necessary. It is a bit more expensive and things get ugly if you have lots of objects doing this close to each other, but it does work, very well.

9. extraammoSenior Engineer

Messages:
1,015
The method I proposed varies only in that it's a predictive estimate done with static colliders. There are fast equations for detecting if two colliders are touching. I'm tempted to try this out in unity now.

10. PfoApprentice Engineer

Messages:
237
Unity uses Physx, right? Physx already supports this, I don't know if Unity does though: https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Advanced.html

Messages:
1,015
12. J KuyperTrainee Engineer

Messages:
43
Uhhh thanks guys...

I saw the thread that you referred to when I was searching to see if my idea was already suggested. That is quite a thread you have there!
I'm not sure that this is really the same thing. They could work together. As I understand it, the relative model you suggested would help control groups of objects in close proximity. In Star Trek terminology, the Relative Coordinate thing would be like the warp bubble that envelopes a star ship when it travels at warp speed. Everything in the warp bubble travels together / relative to each other. But there may be other "warp bubbles" out there. What happens when the warp bubbles come within contact? That is where the variable speed limit would come into play.

I know the "suddenly slowing down for no reason" thing doesn't work too well. So, why not flip the equation. You can have the same effect by saying the speed is constant, but the game time would speed up until someone is too close to an object. That way, the player doesn't have to wait half an hour - only five minutes. Conversely, I have seen suggestions that the game speed slow down for collisions (something that already happens on slower machines ... he he he.) I'm not sure how I'd feel about variable time...

I didn't think about the gravity thing. Not all objects in Space Engineers generate gravity. So the program only calculates distances to objects with gravity. So you could blow right through another space engineer because they don't generate gravity. The program wouldn't know which object is the closest until it calculated distances for all of them. And by the time you did that ... well, you might end up running just as slow...

It was a thought... Thanks for the input.