Author Topic: Jump distances  (Read 2473 times)

0 Members and 1 Guest are viewing this topic.

Is there any way to calculate the jump-in and jump-out distances of ships? How does the engine calculate those?
Would be really nice if there was an easy way to do this instead of trial and error.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Well... you can always use scripting to determine the jump in and jump out distances
Do not meddle in the affairs of coders for they are soggy and hard to light

 
Looking at the code at least for HUGE ships it seems easy to calculate...

Warpout distance = length * 0.5 - bbminz

length = length of the bounding box z dimension
bbminz = min z value of bounding box (negative, so it actually adds to the distance)

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Does the engine actually check for a collision based on that data or does it check on a static short distance?  I worry because the current FotG warpout code actually warps the ship halfway across the playing field.  If it doesn't check through the necessary field of play we could try to warp through a Star Destroyer.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
I haven't checked for that. It checks for something special when a ship is docked.. but I don't know if it does colission detection.

The warp code is quite messy and hard to understand at all.

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
how hard would it be to add a little indicator in fred which, if activated, would show where the jump hole would be when the ship warps out. this could save fredders alot of trial and error work.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline dANGER boy

  • 27
  • New and improved, v2.0
    • Vortex Research & Design
Amen to that.  I've had the same idea but have just reverted to trial-and-error while Fredding.
[21:39] * Now talking in #hard-light
[21:39] <Zacam> Dear. God.
[21:39] * dANGER_boy is now known as God
[21:39] <God> Yes, I'm here
[21:39] <Zacam> I'd like to file a bug report.
[21:40] * thesizzler is now known as Jesus
[21:40] <Jesus> sup
[21:40] <God> Check with my secretary.
[21:40] <Jesus> hey dad
[21:40] <Zacam> Regarding the INANE flaws in human intelligence and the equality (or disparity) therof.
[21:40] * God points at Jesus
[21:40] * mura is now known as WhitePidgeon
[21:40] <+WhitePidgeon> kuuuuu

 
well as I wrote, with large capships you can calculate it with abolve formula.

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
I don't think there's a lot of collision detection going on when a ship warps in. I remember trying to fire bombs at a Deimos or Orion that was still in the process of jumping in and the bombs simply went through it.
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline colecampbell666

  • I See Dead Pictures
  • 212
  • Evolution and ascension.
Affirmative. Shots don't damage them until they're nearly through.
Gettin' back to dodgin' lasers.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
How does the collision warning - unable to jump thing work?

That is, when you're in a fighter, and you press alt+j, and it says "screw you" because there's a ship or asteroid in your way -- how does it determine that?

  

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Affirmative. Shots don't damage them until they're nearly through.
Back during "Playing Judas" in FS1, I've had the Eva run me over as it warped in, and it never even touched me.  It made lining up for scanning it quite easy.
The Trivial Psychic Strikes Again!