Hyperspave travel

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

User avatar
Rese249er
---- E L I T E ----
---- E L I T E ----
Posts: 647
Joined: Thu Jun 07, 2012 2:19 pm
Location: Well, I WAS in G3...

Re: Hyperspave travel

Post by Rese249er »

When the wormhole appears, you're still in normal space. The stretch effect ought to disappear once fully within witchspace... Or distort the witchspace background.
Got all turned around, lost my nav connection... Where am I now?
jacksy
Dangerous
Dangerous
Posts: 101
Joined: Sun Nov 25, 2012 1:57 pm
Location: Hull, Yorkshire, UK

Re: Hyperspave travel

Post by jacksy »

Anyway, is it possible to create an OXP that could calculate after I inputted my destination. I am travelling from A to B, which is say a distance of 5LY. Then depending on the time paramaters set in the script e.g. 1Ly=5secs, correctly calculate that I should be in hyspespace for 25secs and then execute that?
Is it also possible to link a video/FX of my preferred hyperspace to that 25secs?
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:

Re: Hyperspave travel

Post by Commander McLane »

jacksy wrote:
Anyway, is it possible to create an OXP that could calculate after I inputted my destination. I am travelling from A to B, which is say a distance of 5LY. Then depending on the time paramaters set in the script e.g. 1Ly=5secs, correctly calculate that I should be in hyspespace for 25secs and then execute that?
Is it also possible to link a video/FX of my preferred hyperspace to that 25secs?
Not currently, I'm afraid, because the witchspace sequence is hardcoded. While you can replace the rings with another animation, you cannot change how long the animation lasts. And the duration is the same, regardless how far you travel.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Hyperspave travel

Post by another_commander »

Commander McLane wrote:
jacksy wrote:
Anyway, is it possible to create an OXP that could calculate after I inputted my destination. I am travelling from A to B, which is say a distance of 5LY. Then depending on the time paramaters set in the script e.g. 1Ly=5secs, correctly calculate that I should be in hyspespace for 25secs and then execute that?
Is it also possible to link a video/FX of my preferred hyperspace to that 25secs?
Not currently, I'm afraid, because the witchspace sequence is hardcoded. While you can replace the rings with another animation, you cannot change how long the animation lasts. And the duration is the same, regardless how far you travel.
Also note that an effect lasting 25 seconds may look cool the first couple of times you watch it, but after a while you'll be wishing there was a "skip it" button somewhere. Looking at the screen for almost half a minute doing nothing at all can get old much quicker than you think.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Hyperspave travel

Post by cim »

Not easily with how things currently work (at least, not for that long a sequence). Currently the sequence is as follows:
  1. Countdown completes, final checks made, flight controls locked, player exits old system (shipWillEnterWitchspace)
  2. Move player to new system, add initial population of new system (shipWillExitWitchspace)
  3. Display witchspace exit sequence (appearance customisable in next version) for ~2.5 seconds while AI is initialised
  4. Display new system, return flight control to player (shipExitedWitchspace)
The problem with the current set up is that during step 3, the player's ship can be attacked if there's anything near the entry point. This is normally fine - 2.5 seconds isn't long enough for the AI ships to do more than wake up, turn around to aim, and maybe fire a shot or two at the emerging player. 25 seconds, on the other hand...

It might be practical to allow an extended sequence with AIs only being started in the last couple of seconds of the sequence, though. I'll have a look at how straightforward that would be: allowing the timing to be adjusted slightly might be especially useful for the docking/launch sequences.

Redrawing the witchspace tunnel effect is not possible in 1.76.1, but will be in the next version.
jacksy
Dangerous
Dangerous
Posts: 101
Joined: Sun Nov 25, 2012 1:57 pm
Location: Hull, Yorkshire, UK

Re: Hyperspave travel

Post by jacksy »

another_commander wrote:
Commander McLane wrote:
jacksy wrote:
Anyway, is it possible to create an OXP that could calculate after I inputted my destination. I am travelling from A to B, which is say a distance of 5LY. Then depending on the time paramaters set in the script e.g. 1Ly=5secs, correctly calculate that I should be in hyspespace for 25secs and then execute that?
Is it also possible to link a video/FX of my preferred hyperspace to that 25secs?
Not currently, I'm afraid, because the witchspace sequence is hardcoded. While you can replace the rings with another animation, you cannot change how long the animation lasts. And the duration is the same, regardless how far you travel.
Also note that an effect lasting 25 seconds may look cool the first couple of times you watch it, but after a while you'll be wishing there was a "skip it" button somewhere. Looking at the screen for almost half a minute doing nothing at all can get old much quicker than you think.
I appreciate that another_commander, I know this would not be everybody's cup of tea, but this is my cup of tea :D
Last edited by jacksy on Tue Dec 04, 2012 11:07 am, edited 1 time in total.
jacksy
Dangerous
Dangerous
Posts: 101
Joined: Sun Nov 25, 2012 1:57 pm
Location: Hull, Yorkshire, UK

Re: Hyperspave travel

Post by jacksy »

cim wrote:
Not easily with how things currently work (at least, not for that long a sequence). Currently the sequence is as follows:
  1. Countdown completes, final checks made, flight controls locked, player exits old system (shipWillEnterWitchspace)
  2. Move player to new system, add initial population of new system (shipWillExitWitchspace)
  3. Display witchspace exit sequence (appearance customisable in next version) for ~2.5 seconds while AI is initialised
  4. Display new system, return flight control to player (shipExitedWitchspace)
The problem with the current set up is that during step 3, the player's ship can be attacked if there's anything near the entry point. This is normally fine - 2.5 seconds isn't long enough for the AI ships to do more than wake up, turn around to aim, and maybe fire a shot or two at the emerging player. 25 seconds, on the other hand...

It might be practical to allow an extended sequence with AIs only being started in the last couple of seconds of the sequence, though. I'll have a look at how straightforward that would be: allowing the timing to be adjusted slightly might be especially useful for the docking/launch sequences.

Redrawing the witchspace tunnel effect is not possible in 1.76.1, but will be in the next version.
Well that sounds more promising and so my little wish is not out of the question. You mention redrawing of the witchspace tunnel, does the tunnel have to be drawn? can a video fx be used by the player to replace the drawing in the next version?

cheers
Last edited by jacksy on Tue Dec 04, 2012 11:13 am, edited 2 times in total.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16059
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Hyperspave travel

Post by Cody »

cim wrote:
This is normally fine - 2.5 seconds isn't long enough for the AI ships to do more than wake up, turn around to aim, and maybe fire a shot or two at the emerging player. 25 seconds, on the other hand...
Twenty-five seconds would be calamitous in IS after a mis-jump!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Hyperspave travel

Post by cim »

jacksy wrote:
Well that sounds more promising and so my little wish is not out of the question. You mention redrawing of the witchspace tunnel, does the tunnel have to be drawn? can a video fx be used by the player to replace the drawing in the next version?
If by videos you mean playing a separate video file, no. The tunnel has to be rendered as an in-game object, though with shader support and appropriate texture data you can get quite a bit of flexibility in appearance and animation.
jacksy
Dangerous
Dangerous
Posts: 101
Joined: Sun Nov 25, 2012 1:57 pm
Location: Hull, Yorkshire, UK

Re: Hyperspave travel

Post by jacksy »

cim wrote:
jacksy wrote:
Well that sounds more promising and so my little wish is not out of the question. You mention redrawing of the witchspace tunnel, does the tunnel have to be drawn? can a video fx be used by the player to replace the drawing in the next version?
If by videos you mean playing a separate video file, no. The tunnel has to be rendered as an in-game object, though with shader support and appropriate texture data you can get quite a bit of flexibility in appearance and animation.

Just so that I am clear, the timing cannot be flexible and dependant on distance to be travelled?It is has to be a set time each and every time?
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Hyperspave travel

Post by cim »

jacksy wrote:
Just so that I am clear, the timing cannot be flexible and dependant on distance to be travelled?It is has to be a set time each and every time?
With the current state of the next version, the time between "enter new system" and "regain flight control" is fixed. You can make the tunnel effect last as long as you like, however, including varying that with travel distance if you want.
jacksy
Dangerous
Dangerous
Posts: 101
Joined: Sun Nov 25, 2012 1:57 pm
Location: Hull, Yorkshire, UK

Re: Hyperspave travel

Post by jacksy »

cim wrote:
jacksy wrote:
Just so that I am clear, the timing cannot be flexible and dependant on distance to be travelled?It is has to be a set time each and every time?
With the current state of the next version, the time between "enter new system" and "regain flight control" is fixed. You can make the tunnel effect last as long as you like, however, including varying that with travel distance if you want.
The next version sounds like it will be able to handle exactly what I was after then? So talking here about the new version, how difficult would a script be to create that automatically understands that A is 10Ly away from B and therefore the hyperspace tunnel Fx should last 50secs and then on the next jump it knows that A is now only 4 Ly away from B on this occasion and the jump should last only 20secs this time?

cim I am sorry if i sound thick.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Hyperspave travel

Post by Thargoid »

It would be quite simple (note your fuel level just prior to jump and then just after jump and subtract the two to give distance).

The issue is that the effect would essentially be displayed in front of the player ship for the extra time, and it would block out everything else visible. Hence for up to about 47.5 seconds the scanner and the rest of the HUD would show what is actually around the ship (unless the HUD was switched off for the period) and more importantly as noted above - any ship around the place will be going about its business and quite possibly it could attack the player ship, or indeed the player ship could go splat into it. But all the while the player could do little about it as the effect would be continually blocking their view.

Think of the effect as pulling down a cinema screen in front of the ship and showing your effect onto it - but all the while life is going on around you.
jacksy
Dangerous
Dangerous
Posts: 101
Joined: Sun Nov 25, 2012 1:57 pm
Location: Hull, Yorkshire, UK

Re: Hyperspave travel

Post by jacksy »

Thargoid wrote:
It would be quite simple (note your fuel level just prior to jump and then just after jump and subtract the two to give distance).

The issue is that the effect would essentially be displayed in front of the player ship for the extra time, and it would block out everything else visible. Hence for up to about 47.5 seconds the scanner and the rest of the HUD would show what is actually around the ship (unless the HUD was switched off for the period) and more importantly as noted above - any ship around the place will be going about its business and quite possibly it could attack the player ship, or indeed the player ship could go splat into it. But all the while the player could do little about it as the effect would be continually blocking their view.

Think of the effect as pulling down a cinema screen in front of the ship and showing your effect onto it - but all the while life is going on around you.
I might be wrong, but did someone not mention that they may also be able to change the timings on the NPC. So that they would not kick in till after the event?

Just found this from cim

cim
it might be practical to allow an extended sequence with AIs only being started in the last couple of seconds of the sequence, though. I'll have a look at how straightforward that would be: allowing the timing to be adjusted slightly might be especially useful for the docking/launch sequences.?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Hyperspave travel

Post by Thargoid »

Not based on current trunk.

There would be the "jump sequence" (currently the rings, but that can be changed in 1.77) which lasts a fixed time (~2.5 seconds). After that we essentially arrive in the new system, but a second effect for any length of time you want can be displayed. But during that time you are already in the new system, and the NPCs in it are also there and fully active.

Essentially the minimum display time is 2.5s (jump sequence plus no additional effect) but it can be lengthened all you want using the secondary effect. But short of doing something like moving/removing all NPCs etc located around the player on arrival then nothing can be done to stop life going on during the secondary effect. And trying to do that and then restore everything afterwards (when the player appeared to finally arrive, after the secondary effect) would be a nightmare.

What Cim discusses would be a modification to the trunk code, which I leave to his judgement and discretion. Essentially it is unfixing the 2.5 seconds described above and allowing it to be adjusted.
Post Reply