distant effects of a ship's mass or energy?

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

distant effects of a ship's mass or energy?

Post by Commander McLane »

Okay, I have this huge generation ship there. And then there are a lots of small ships that are supposed to swarm around it. I have given them an AI to do so and I have spawned them somewhere close to the Generation Ship. 32 small ships, to be precise.

The problem is: before I even get close to the place most of them have spontaneously exploded! As far as I can see from the distance there are a lot of explosions about like 20000 or 30000 meters away from the giant ship. When I am there I meet perhaps 4 or five survivors. But those seem to be perfectly okay and do what they are supposed to do. Okay, sometimes, out of a sudden, one by one, they explode, too. I'm not talking of a collision here, they are still a couple of thousand meters away from the Generation ship.

I tried to give them a ridiculous amount of energy: 999999 compared to the Generation Ship's 50000: now the Generation Ship blew up!

I tried to reset the small ships' energy to 10000 with a recharge-rate of 10000 as well. Now they are blowing up again.

What I'd like to know: Are there any effects of a ship's mass or perhaps energy that would prevent other ships from getting even close to it? By penalty of death? Do they perhaps depend on the angle a small ship is approaching a huge one at? And how could I overcome such effects?

Funny thing is: The ships that are launching from the Generation Ship seem to be fine, except when they chose to turn around and ram it.

I've even seen one of my small ships touching the Generation ship, going a small way through its interior, with no loss of energy. Okay, that's due to the poor collision detection. But why do they blow up in the distance?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

I suspect it’s just buggy collision handling. :-/
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

I'm not sure. Is the collision handling really so buggy that it would detect a collision between two entities that are apart from each other more than 20000 meters? I followed one of my small ships on its course to and away from the Generation ship, making an entity dump of it every couple of seconds that didn't show a substantial loss of energy (although for reasons I don't know it had only 237 or so of its max_energy of then 250), until suddenly it exploded, the blip of the Generation Ship not even visible on my compass! So definitively more then 25600 meters away.

Selezen wrote me this in a PM:
Selezen wrote:
Can't really help you with that one - I was having similar problems with the TOGY.

The only thing I can think of is that the shield zone around a Generation Ship is huge and those ships are hitting the shield zone. Dunno how to change that though. Remember that the spawn code calculates the distance from the exact centerpoint of your generation ship - all I can suggest is increase the distance, but as you said it has to be in a certain range to work with the role detection.

Ahruman's probably your man.
Is there anything to it? I mean, is there something like a shield-zone around each entity, growing with its size and/or mass and therefore being huge with something like a Generation Ship?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Nah. NPCs don’t even have shields.

Collisions should only happen on direct contact. However, this “direct contact” is calculated using octrees – essentially, a low-resolution (apparently 32x32x32) voxel representation of a shape. This imprecision shouldn’t be bad enough to reach out 25 km from a generation ship. I guess I should dig through the repository to find the octree debug drawing code…
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

The problem is the same with the original generation ships from genship.oxp, by the way. If you meet them in interstellar space they literally plough through space, blowing up at least all the thargoid ships the meet, leaving debris all along their path.

All the time I thought this was deliberate behaviour through their AI. Something like: setTargetToPrimaryAggressor, "scriptActionOnTarget: becomeExplosion". But now I had a look and ... it isn't. The only thing they do when attacked is ... disappear (by landOnPlanet). So also their impact on thargoids is a bug.
Post Reply