Page 1 of 3

Should Rock Hermit asteroids block laser fire?

Posted: Wed Aug 18, 2010 8:25 am
by Switeck
Because in my game, I'm taking laser hits by ai ships shooting through the Rock Hermit asteroid.

It does block missiles and accidental-ramming by the same ai ships trying to take the shortest route to get to me. :lol:

This not-blocking-laser-fire may also extend to other ships in general...they're just too small and hard to test with.

Posted: Wed Aug 18, 2010 8:50 am
by Commander McLane
Of course they should, and if they don't, it's a bug.

I blame the collision detection (but I could be wrong). By the way, I have also seen ships pass through bigger asteroids, which is of course also wrong.

Re: Should Rock Hermit asteroids block laser fire?

Posted: Wed Aug 18, 2010 10:13 pm
by DaddyHoggy
Switeck wrote:
Because in my game, I'm taking laser hits by ai ships shooting through the Rock Hermit asteroid.

It does block missiles and accidental-ramming by the same ai ships trying to take the shortest route to get to me. :lol:

This not-blocking-laser-fire may also extend to other ships in general...they're just too small and hard to test with.
Ah, so you've discovered the special holographic rock hermits... :wink:

Posted: Thu Aug 19, 2010 12:38 am
by Switeck
I tried hiding behind regular asteroids to test laser fire on them...but for whatever reason they don't last too long. They can usually take 1 missile hit though, if you have an annoying ECM-resistant hardhead on your tail.

Posted: Thu Aug 19, 2010 10:43 am
by Commander McLane
Switeck wrote:
I tried hiding behind regular asteroids to test laser fire on them...but for whatever reason they don't last too long. They can usually take 1 missile hit though, if you have an annoying ECM-resistant hardhead on your tail.
Yes, asteroids have an energy of 100, and no recharge (of course). A mining laser inflicts a damage of 50, so two hits vaporize the asteroid. With a military laser it takes a couple more shots (off the top of my head the damage inflicted is 23, which makes for five hits, which coincides with my experiences), but because of the almost permanent firing power I guess it takes less seconds than with a mining laser which has a fairly big interval between two shots.

Most (if not all) missiles inflict less damage than 100, so you would indeed expect an asteroid to survive one direct hit.

Posted: Thu Aug 19, 2010 6:18 pm
by Thargoid
Commander McLane wrote:
Most (if not all) missiles inflict less damage than 100, so you would indeed expect an asteroid to survive one direct hit.
Where are you getting your missiles from? You should ask for a refund ;)

Unless they happened to detonate near the edge of their collision radius (250m), they'll do rather more damage than that. On my system an asteroid is almost always vaped by a standard missile (but that says more about my lack of FPS than anything else I guess).

Posted: Thu Aug 19, 2010 6:44 pm
by Commander McLane
Thargoid wrote:
Commander McLane wrote:
Most (if not all) missiles inflict less damage than 100, so you would indeed expect an asteroid to survive one direct hit.
Where are you getting your missiles from? You should ask for a refund ;)

Unless they happened to detonate near the edge of their collision radius (250m), they'll do rather more damage than that.
Oops! :oops: You're right, of course. I should've looked it up before answering. A missile detonating right on an asteroid should of course take it out. But the damage drops dramatically with distance (by power of two?, of three?, exponentially?; I'm not sure), so at a greater distance the asteroid could survive.

Posted: Fri Aug 20, 2010 3:24 am
by Switeck
With nonmoving asteroids, missiles should consistently 1-shot-kill them...or NOT 1-shot-kill them if the missiles are meant to be weak.

Posted: Fri Aug 27, 2010 7:22 am
by Switeck
Here's a bit of definitive proof that Rock Hermits (or Pirate Coves, which uses the Rock Hermit model) do not make good cover from laser fire:

Image

Image

Image

The 2nd and 3rd smaller pictures link to short animated versions of what was happening. (They're about 2 and 4 MB in size!)

Posted: Fri Aug 27, 2010 8:32 am
by snork
Would it maybe have to do with the very low framerate that Switeck has the game running at ?

In 1.73, before the asteroids and such got their "solidity" raised, I could sometimes fly right through them (iirc), when torusdrive-speeding and framerates were low. I once even flew right through a rock hermit.

I have no idea how Lasers actually work, game-mechanism-wise.
Does their lightbeam actually take time to "travel" or is the whole laserbeam there in one moment ?

Posted: Fri Aug 27, 2010 9:31 am
by Eric Walch
snork wrote:
Would it maybe have to do with the very low framerate that Switeck has the game running at ?

In 1.73, before the asteroids and such got their "solidity" raised, I could sometimes fly right through them, when torusdrive-speeding and framerates were low. I once even flew right through a rock hermit.

I have no idea how Lasers actually work, game-mechanism-wise.
Does their lightbeam actually take time to "travel" or is the whole laserbeam there in one moment ?
Laser hits should not be framerate related. With collisions, the positions of two objects are only calculated on the "frame". There is no interpolation between frames. Would also not make sense to try that as we only would need it al low frame rates, and that is the situation were the processor already runs at its max.

With laser fire, framerate has no effect on quality. When a laser is fired, Oolite is checking every entity in the system against that beam. And with all entities than lie in the path of the beam, it chooses the closest to hit. So, what is described here should never happen and is a bug.

Posted: Fri Aug 27, 2010 9:44 am
by Switeck
snork wrote:
In 1.73, before the asteroids and such got their "solidity" raised, I could sometimes fly right through them (iirc), when torusdrive-speeding and framerates were low. I once even flew right through a rock hermit.
The framerate is taking hits from me making screenshots at the rate of ~1 a second plus all the OXPs I have loaded plus this system's over 5 years away from being top-of-the-line.

At the end of the second short animation, there's a bright flash. That's the Moray failing to fly through the Pirate Cove/Rock Hermit to get to me.

Posted: Sun Aug 29, 2010 2:50 am
by Switeck
Inside Oolite's shipdata.plist file, I noticed "asteroid" has this line:
density = 5;
...while "rock-hermit" does not.

Either that, or the hollow space needed to make Rock Hermits allow docking without crashing could be to blame.

I'll be testing Rock Hermits with density = 5; ...but I don't know whether to make the 5 higher or lower.

From http://wiki.alioth.net/index.php/Shipdata.plist :
density
This real value is used to calculate a ships total mass. Default is 1.0 (Introduced in version 1.69?)

Example:
<key>density</key>
<real>1.5</real>

Posted: Sun Aug 29, 2010 9:39 am
by Eric Walch
Switeck wrote:
Inside Oolite's shipdata.plist file, I noticed "asteroid" has this line:
density = 5;
...while "rock-hermit" does not.
Density as parameter was added long ago, but Oolites own ships always had a value of 1. I changed it to 5 for asteroids with 1.74 because asteroids should be much denser than hollow ships or even hollow hermits. But the main reason to raise the asteroid weight was to discourage ramming boulders with the ship to mine splinters :lol:

Density has nothing to do with laser fire. Which entity is hit by laser is fully calculated in universe.m in the function: getFirstEntityHitByLaserFromEntity. That function uses a starting point, a direction and a beam length. Based on that it calculates for every entity in the system if the beam hits the entity and chooses the closest. When something goes wrong, it would be here.

Posted: Sun Aug 29, 2010 7:29 pm
by Switeck
What I don't get is my laser is blocked by the Rock Hermit/Pirate Cove just fine.