Forums » Bugs
Stop with the things inside of other things
This might seem silly, but why in the heck does the game engine even allow cargo or the center point of player ships and missiles to exist inside of "solid" objects like asteroids and station modules?
You can lag ships through the race tubes, stick them inside of asteroids, stuff cargo in stations where nobody can grab it, and shoot missiles (stingrays) straight through a hive queen without them detonating.
Wouldn't it make sense to do a server-side check on this and override their position and place them on the nearest outside surface instead? (or in the case of missiles, detonate them)
I understand that collision detection between two complex polygons is computationally intensive and would probably cause massive lag if the server had to do this for every object, but wouldn't a faster check on the center point of the object be feasible? If the center of a missile is INSIDE of a queen, it's pretty safe to assume that it got there by hitting it.
You can lag ships through the race tubes, stick them inside of asteroids, stuff cargo in stations where nobody can grab it, and shoot missiles (stingrays) straight through a hive queen without them detonating.
Wouldn't it make sense to do a server-side check on this and override their position and place them on the nearest outside surface instead? (or in the case of missiles, detonate them)
I understand that collision detection between two complex polygons is computationally intensive and would probably cause massive lag if the server had to do this for every object, but wouldn't a faster check on the center point of the object be feasible? If the center of a missile is INSIDE of a queen, it's pretty safe to assume that it got there by hitting it.
Easier said than done.
Plus, providing a means to magically transport ships doesn't sound like a good idea. That's just asking to be exploited (such as disconnect the instant you pass through a wall to maintain that average speed where you moved 100m in one frame perhaps?).
Plus, providing a means to magically transport ships doesn't sound like a good idea. That's just asking to be exploited (such as disconnect the instant you pass through a wall to maintain that average speed where you moved 100m in one frame perhaps?).
I don't see why that's a concern. Since this would be a server-initiated position correction, it could also reset your velocity to zero.
The things inside of things check wouldn't even need to be run every "tick", just once every couple seconds to prevent crap like cargo from staying inside of an object or ships hiding from radar inside roids.
The things inside of things check wouldn't even need to be run every "tick", just once every couple seconds to prevent crap like cargo from staying inside of an object or ships hiding from radar inside roids.
Actually, if the object inside the roid is a ship... don't move it at all. Just kill it.
It is not that computationally trivial to do what you're asking. The whole idea of "inside" is the problem. Yes, you can take the centerpoint of the ship, but then how do you determine that it is "inside" an asteroid? You have to do a complex test down to fairly precise level of the asteroid's collision hull to make that determination. Asteroids are oddly shaped objects with concave craters and other features.
Or, you can do a simple test and say nothing is allowed within the "sphere" of potential interaction of an object, but for a big object, that sphere can be *huge*, and wildly inaccurate compared to the actual object shape.
Anyway, this is generally on our to-do list, but in terms of it being something the engine just "does", no, that is not likely. Different games handle this in different ways, but it tends to be content-specific, because generally disallowing all interpenetration, and testing for it on the single point of the server, would not be a good thing. Yes, you can only test periodically (every few seconds), but there are still edge cases that will crop up, and it's not necessarily a trivial thing to solve.
There are optimizations that other games have done, like computationally "packing" physics primitives into an object's shape to try and get a rough approximation for testing purposes, while also getting fast primitive-to-primitive collision checks. But, we have not implemented that, and it's not clear that would be the best solution for us either.
Upshot: it is on the todo list, we're quite aware of the related issues.
Or, you can do a simple test and say nothing is allowed within the "sphere" of potential interaction of an object, but for a big object, that sphere can be *huge*, and wildly inaccurate compared to the actual object shape.
Anyway, this is generally on our to-do list, but in terms of it being something the engine just "does", no, that is not likely. Different games handle this in different ways, but it tends to be content-specific, because generally disallowing all interpenetration, and testing for it on the single point of the server, would not be a good thing. Yes, you can only test periodically (every few seconds), but there are still edge cases that will crop up, and it's not necessarily a trivial thing to solve.
There are optimizations that other games have done, like computationally "packing" physics primitives into an object's shape to try and get a rough approximation for testing purposes, while also getting fast primitive-to-primitive collision checks. But, we have not implemented that, and it's not clear that would be the best solution for us either.
Upshot: it is on the todo list, we're quite aware of the related issues.
Well, it could be reduced to a couple of simpler tests that check a pre-computed sphere encompassing the outer "edge" of the object's collision mesh and a smaller sphere that's tangent to the object's most concave point. That way the computationally intensive check if something is "inside" the collision mesh will only need to be done if the center point of the object falls inside the larger sphere but outside the smaller sphere.
Even if the server does this check once every few seconds or minutes it will still be an enormous improvement over the situation we have now, where cargo will end up inside an asteroid and stay there until it times out. More than a few expensive capital ship parts have been lost to the void this way. :P
Either way, thanks for putting it on the todo list...
Even if the server does this check once every few seconds or minutes it will still be an enormous improvement over the situation we have now, where cargo will end up inside an asteroid and stay there until it times out. More than a few expensive capital ship parts have been lost to the void this way. :P
Either way, thanks for putting it on the todo list...
So since I was trying various ways of recording in-game video, I made a quick video of me screwing up the race record times.
https://www.youtube.com/watch?v=gawa57qgjdo
The ease of getting through objects really depends on the ship's collision mesh and the angle you hit it at. Ships with a relatively flat underside like the Centurion work better than the new Vulture model for example.
Anyway, fixing this would be nice. If the plan is to increase the size and density of roid fields one has to fly through to get to certain points of interests, more collisions are bound to happen especially with capships clipping roids. That might lead to weird collision experiences ;)
Edit: Another short one with roids and a station: http://www.youtube.com/watch?v=9J085vQ8wLM
https://www.youtube.com/watch?v=gawa57qgjdo
The ease of getting through objects really depends on the ship's collision mesh and the angle you hit it at. Ships with a relatively flat underside like the Centurion work better than the new Vulture model for example.
Anyway, fixing this would be nice. If the plan is to increase the size and density of roid fields one has to fly through to get to certain points of interests, more collisions are bound to happen especially with capships clipping roids. That might lead to weird collision experiences ;)
Edit: Another short one with roids and a station: http://www.youtube.com/watch?v=9J085vQ8wLM
One problem I have found is that some asteroids with ores on them cannot be mined, you just bounce off them and the mining beam will not engage. I have destroyed bots and the cargo is inside the asteroid, no biggie to me but the asteroid staying immune to the mining beam bothers me because most of the times are the ores I need for the quest.