Screen delay on arrival at the witchpoint
Moderators: winston, another_commander
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
Screen delay on arrival at the witchpoint
A cosmetic thing, really, but I was wondering if there could be a brief delay in activating the viewscreens on arrival in a new system. A couple of times, on arrival I've managed to take a quick look out the rear view and have seen e.g. a Convenience Store arriving: it appears in a little ring of light as if it's just witched in itself. Is it possible to install a very brief delay, so that everything that's supposed to be in the system arrives before the player sees it? Maybe disguise it with a bit of static or distortion or something on the viewscreen? It's not a major problem, but it does look a bit odd seeing a station pop into existence ...
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
I like the idea in principle, but what about those situations where you 'emerge' (traveling at low speed) right in front of the buoy or billboard.
This has happened to me on several occasions and I haven't always been able to stop/change course in time.
Might this not make this problem worse?
This has happened to me on several occasions and I haven't always been able to stop/change course in time.
Might this not make this problem worse?
Commander Smivs, the friendliest Gourd this side of Riedquat.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Ehm... yeah... see, this is an after-effect of the hyperspace sequence. The entities are already there and they don't pop into existence, it's just that you are seeing something similar to the dark spots/shapes appearing when you close your eyes after having stared at bright light for a while. This has been reported by pilots on various occasions in the past and it is all explained in detail in the article "An Analysis of Residual and Temporal Effects of Hyperspace Transit", published in the GalCop Scientific Journal vol.2, Pages 24-30, University of Lave Publications, 3109.Disembodied wrote:A cosmetic thing, really, but I was wondering if there could be a brief delay in activating the viewscreens on arrival in a new system. A couple of times, on arrival I've managed to take a quick look out the rear view and have seen e.g. a Convenience Store arriving: it appears in a little ring of light as if it's just witched in itself. Is it possible to install a very brief delay, so that everything that's supposed to be in the system arrives before the player sees it? Maybe disguise it with a bit of static or distortion or something on the viewscreen? It's not a major problem, but it does look a bit odd seeing a station pop into existence ...
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
A pinch of handwavium is worth a pound of programming! I'm completely convinced.another_commander wrote:Ehm... yeah... see, this is an after-effect of the hyperspace sequence. The entities are already there and they don't pop into existence, it's just that you are seeing something similar to the dark spots/shapes appearing when you close your eyes after having stared at bright light for a while. This has been reported by pilots on various occasions in the past and it is all explained in detail in the article "An Analysis of Residual and Temporal Effects of Hyperspace Transit", published in the GalCop Scientific Journal vol.2, Pages 24-30, University of Lave Publications, 3109.
In space no-one can hear your ship approach, and so you caught the Universe unawares and only half-dressed?
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Commander McLane
- ---- 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:
Isn't that what the shipWillExitWitchspace-handler is for? To spawn entities which are supposed to already be there when the player gets spawned?
By the way, the obvious wrongness of having stations close to the witchpoint appear like they just jumped in is why I requested an optional suppress-witchspace-exit-rings parameter for the ship spawning functions. I wasn't heard by the powers-that-be.
By the way, the obvious wrongness of having stations close to the witchpoint appear like they just jumped in is why I requested an optional suppress-witchspace-exit-rings parameter for the ship spawning functions. I wasn't heard by the powers-that-be.
Totally untested, but this:
should do the trick... barring the odd logic mistake or two!
Edit: thanks Ahruman!
...and still waiting for brave testers to verify whether this works or not!
Code: Select all
system.addShipsNoRings = function (role,count,position,radius) {
if (count-0 < 1) count = 1;
var offset =new Vector3D(0,50000,0);
var ships=system.addShips(role, count, offset,radius);
if (position) offset=position.subtract(offset);
else offset=offset.multiply(-1);
var i=0;
while (i++<ships.length){
ships[i].position=ships[i].position.add(offset);
}
return ships;
}
Edit: thanks Ahruman!
...and still waiting for brave testers to verify whether this works or not!
Last edited by Kaks on Thu Dec 16, 2010 10:36 am, edited 2 times in total.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Unless someone’s been mucking about behind my back, that needs to be new Vector3D(0, 0, 0).subtract(offset), or alternatively offset.multiply(-1).Kaks wrote:else offset=[0,0,0].subtract(offset);
E-mail: [email protected]
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Also untested, but there is an other problem. In my current experience with JS is "position" always transferred as an array, even when explicit defining position a Vector3D-object in the calling function. This results inKaks wrote:Totally untested, but this:
should do the trick... barring the odd logic mistake or two!Code: Select all
system.addShipsNoRings = function (role,count,position,radius) { if (count-0 < 1) count = 1; var offset =new Vector3D(0,50000,0); var ships=system.addShips(role, count, offset,radius); if (position) offset=position.subtract(offset); else offset=offset.multiply(-1); var i=0; while (i++<ships.length){ ships[i].position=ships[i].position.add(offset); } return ships; }
Edit: thanks Ahruman!
...and still waiting for brave testers to verify whether this works or not!
Code: Select all
offset=position.subtract(offset);
Code: Select all
position = new Vector3D(position)
When using "position" in a addShips method there is no problem as those accept arrays, but not when used in Vector3D methods.
That is the big minus of JS were you can't declare any types. You also needed tricks in above code to make sure that "count" is a number. I almost want back to my Algol 60 days, the first language I had to learn. It felt that in Algol60 every variable was at least declared twice to be on the sure side.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Kaks, just tested your code. Explicit converting the position was not needed as I stated above. Probably because you assign it to 'offset' what already was a Vector3D.
The counter was wrong as it tried to access one ship to much. (Although I fail to so why your formulation generated errors for 'ships') Following code is tested to work.
Than using system.addShipsNoRings(role,count,position,radius) adds the ships without rings and nicely returning the ship array
The counter was wrong as it tried to access one ship to much. (Although I fail to so why your formulation generated errors for 'ships') Following code is tested to work.
Code: Select all
system.addShipsNoRings = function (role,count,position,radius) {
if (count-0 < 1) count = 1;
var offset =new Vector3D(0,50000,0);
var ships=system.addShips(role, count, offset,radius);
if (position) offset=position.subtract(offset);
else offset=offset.multiply(-1);
var i=0;
while (i < ships.length)
{
ships[i].position=ships[i].position.add(offset);
i++;
}
return ships;
}
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Oops! I know exactly why! The test itself was correct, but when inside the while loop the i was already incremented..
Memo to self: do not write code at 1:48 am, especially when you've got no way of testing it!
Memo to self: do not write code at 1:48 am, especially when you've got no way of testing it!
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Yes, I already added it in my version. But now as 'this.' version of the method because an oxp should not add methods to the system object.Switeck wrote:You going to use this command for the constore in Your Ad Here OXP?Eric Walch wrote:Than using system.addShipsNoRings(role,count,position,radius) adds the ships without rings and nicely returning the ship array
I agree with Disembodied that seeing the rings gives a wrong sensation. But because it was hard to get them in sight because the stations are always added behind the player, I did use the new addShip method because of the reference to the added ships.
For YAH I can use a simplified version of the oxp as 'count' will always be zero.
For general use is the above method not complex enough. It should read as:
Code: Select all
this.addShipsNoRings = function (role,count,position,radius) {
if (count-0 < 1) count = 1;
var offset =new Vector3D(0,50000,0);
var ships=system.addShips(role, count, offset, radius);
if (position) offset= new Vector3D(position).subtract(offset);
else offset=offset.multiply(-1);
var i=0;
while (i < ships.length)
{
ships[i].position=ships[i].position.add(offset);
if (ships[i].escorts)
{
var j=0;
while (j < ships[i].escorts.length)
{
ships[i].escorts[j].position=ships[i].escorts[j].position.add(offset);
j++
}
}
i++;
}
return ships;
}
And I also added in the conversion of position to a Vector3D. If not, something like this.addShipsNoRings("constore", 1, [0, 5E3, -30E3], 10E3) will not work as position is transferred as an array in most code.
UPS-Courier & DeepSpacePirates & others at the box and some older versions