Author Topic: Multiple Dockees per Ship  (Read 5788 times)

0 Members and 1 Guest are viewing this topic.

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Multiple Dockees per Ship
<>

There's a problem that should've been fixed a long time ago.  Ships such as the SFr Asmodeus can only dock with one cargo unit.  This severely limits the actual capabilities of the vessel because of a code glitch.

A Fix?
What I propose is simple.  Enable multiple docking for bulk freighters and other vessels with multiple docking points.  This I leave to you source code mages out there.  But there's also the targeting screen problem in-game.  Above the targeted ship, a reticle appears if the ship is docked with another specifying the name of the ship docked.  What we can do for ships with multiple- stuff docked should have the reticle display: "Docked With: [n]", where "n" is the number of ships currently docked with the vessel.  A key should be assigned to toggle the name of the docked ship to be displayed on the reticle.  The "~" key will be used for this example.  When the ~ key is hit, the reticle will cycle through the names of the ships docked with the target.

For example, a SFr Asmodeus is selected as the target.  The "Docked With" reticle will display the following:
1. Display "Docked With: 2"
2. Keyboard Action "Hit ~"
3. Then Display "Docked With: Cargo 1"
4. Keyboard Action "Hit ~"
5. Then Display "Docked With: Cargo 2"
6. Hit the ~ key again and the cycle will start over.


Rampage

 

Offline Petrarch of the VBB

  • Koala-monkey
  • 211
Hmm, this would indeed be useful, especially to we tappers, as we need to get the salvage oojah to work properly.

 

Offline ZylonBane

  • The Infamous
  • 29
Re: Multiple Dockees per Ship
Quote
Originally posted by Rampage
What I propose is simple.  Enable multiple docking for bulk freighters
Wow, that IS simple! Let me take a look at the source code here.... hmmm.... aha! Yup, this line is the culprit--

Code: [Select]

int EnableMultiDocking = false;

Good work, Rampage! I don't know why no-one thought of this before. :yes:
ZylonBane's opinions do not represent those of the management.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
I don't know how that was working at all,
it should have been a bool not an int
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline an0n

  • Banned again
  • 211
  • Emo Hunter
    • http://nodewar.penguinbomb.com/forum
I truly expect ZB's life to end with the words "Oh, I've wasted my life." as a missile of some sort comes hurtling towards him.
"I.....don't.....CARE!!!!!" ---- an0n
"an0n's right. He's crazy, an asshole, not to be trusted, rarely to be taken seriously, and never to be allowed near your mother. But, he's got a knack for being right. In the worst possible way he can find." ---- Yuppygoat
~-=~!@!~=-~ : Nodewar.com

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Re: Multiple Dockees per Ship
Quote
Originally posted by ZylonBane
Wow, that IS simple! Let me take a look at the source code here.... hmmm.... aha! Yup, this line is the culprit--

Code: [Select]

int EnableMultiDocking = false;

Good work, Rampage! I don't know why no-one thought of this before. :yes: [/B]


:lol: You can cut the sarcasm with a knife. ;)

But joking aside, I do think that this would be a fairly easy thing to do.  We just have to figure out a good way,

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
no, I think Zylon's last words would be something along the lines of, "you call that thing a knife" or "ya dumbass, you've got the safety on", though he would likely speak with the corect spellings
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Quote
Originally posted by Bobboau
I don't know how that was working at all,
it should have been a bool not an int


Realistically, an int can handle ture/false values very easy. Remember: in C and C++ only 0 (zero) is false, all other values are true. You can use a bool, a char, an int, any and every sort of pointer, etc--so long as when push comes to shove, you can get a 0 or a !0 when you read it. ;)
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline ZylonBane

  • The Infamous
  • 29
Re: Re: Re: Multiple Dockees per Ship
Quote
Originally posted by Goober5000
But joking aside, I do think that this would be a fairly easy thing to do.  We just have to figure out a good way,
See, I think it'll be a fairly hard thing to do. Flexible systems tend to be an order of magnitude more complex to code than simple systems... and FS2's current one-docking-per-ship setup is quite simple.
ZylonBane's opinions do not represent those of the management.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
Well, Goober5000 does seem to know what he is doing with the code. I'd expect it to be a significant amount of coding to make this work, but if he thinks he can do it, I'm all in favour.  :D
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline ZylonBane

  • The Infamous
  • 29
Oh I think multi-ship docking would be great too.

Rampage's PHB-style thinking just ticked me off. Perhaps someday he'll realize that there's a universe of difference between "enabling" and "implementing".
ZylonBane's opinions do not represent those of the management.

 

Offline Rampage

  • Son Of Rampage
  • 211
  • Urogynaecologist
Quote
Originally posted by ZylonBane
Rampage's PHB-style thinking just ticked me off. Perhaps someday he'll realize that there's a universe of difference between "enabling" and "implementing".


Arg[v]!  Talking behind back!  OH NO!!!  OHHH NOO!

Anyway, I was tired! :) [That's my excuse for everything.]

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Quote
Originally posted by Sesquipedalian
Well, Goober5000 does seem to know what he is doing with the code. I'd expect it to be a significant amount of coding to make this work, but if he thinks he can do it, I'm all in favour.  :D


I sense that I'm being drafted again... :nervous:

I skimmed it, and it looks like most of the docking stuff will work no matter how many ships are docked - the rest is the problem of implementing arrays rather than scalars, plus changing all the docking sexps and AI, and cleaning up loose ends.

I'll have another look at it, but I'm not promising any quick results.  I need a wee break. :)

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
:D  I thought you were tentatively volunteering.
Thanks for all your sexp work.  You're my new best SCP friend. :D
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline diamondgeezer

Goober, if this idea is possible to implement, please at least add it to the To Do list. Multiple docks would be really handy :nod:

Anyone remember the GTI Polaris? The spec said the GTVA would dock as many of them together as they needed, to get a base of the size they needed. If the multiple dock thing gets done, we could dock millions of things together and make... um... teh uber-docked thingie! Woo!

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
:)

Maybe I was (tentatively volunteering).  I'll add it to my To Do list.  I'll have to puzzle it over for a while, but I think I may be able to do it.

And Sesq: once I got a few sexps under my belt, they became extremely easy.  The only hard part was figuring out what extra struff needed to be coded outside of sexp.cpp. :)
« Last Edit: December 29, 2002, 09:19:45 am by 561 »

 

Offline ZylonBane

  • The Infamous
  • 29
Quote
Originally posted by diamondgeezer
If the multiple dock thing gets done, we could dock millions of things together and make... um... teh uber-docked thingie! Woo!
And imagine the physics nightmare when one of the ships decides it wants to move. Like I said, non-trivial.
ZylonBane's opinions do not represent those of the management.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Just add up the respective components of mass and velocity.  I'm sure they do it that way already - suppose just two docked ships try to move?

 

Offline aldo_14

  • Gunnery Control
  • 213
Quote
Originally posted by ZylonBane
And imagine the physics nightmare when one of the ships decides it wants to move. Like I said, non-trivial.


Easiest way (could? - depends if you can sort of set movement to 0 easily..maybe an AI switch to 'none'?) would be to lock the docked ships IMO.  So only the docked-to ship can move... actually, that sort of thing would be useful in fighter carrying (on pylon) ships...

actualkly, does the engine transfer the momentum of a capship to the fighters exiting from a fighterbay?  I've got a feeling that it doesn;t, but not too sure.....

 

Offline ZylonBane

  • The Infamous
  • 29
Quote
Originally posted by Goober5000
suppose just two docked ships try to move?
Suppose they tried to move in opposite directions. :eek:

The engine already has occasional glitches with docked ship movement. Realistically, any multi-docking scheme will have to assign movement privileges to just one ship in the docking chain. The problem will be determing which ship it gets to be. It may very well be necessary to create a new SEXP for this purpose.

Even in this simplified case, pity the poor guy who has to implement the movement-propagation code. With truly unlimited docking, you could easily end up with multiple branching linked lists of dockee data.
ZylonBane's opinions do not represent those of the management.