Page 1 of 1

Docks (and Scoop)

Posted: Fri Aug 29, 2008 2:43 am
by TBeholder
  1. Check dock sizes. No, really*...
    If ship cannot fit in, AI should not even try this dock. In case of PC ships, only proper docks should be made visible.
    At this stage here's only generic "size" for dock and cargo size for ship, just compare latter with some sensible* function of former... And free hold volume (for internal docks), of course.
    * I.e. Ox should never try to "dock" through interceptor garage pod of fighter barrack or inner dock of medical station. I could illustrate this point with handful of rather ridiculous screenshots, but i have vague suspicion that you all saw it more times than you wanted. ;)
  2. Scoop via dock.
    On all ships of decent size place one of those "SPECIAL" mounts behind main dock, so tractor beam could be installed here.
    Forced scoop happens when target enters dock area and is moved by tractor beam. And use the same check function as (1), instead of separate enigmatic mesh measurements. ;)
  3. Eject cargo via dock.
  4. Docks! More docks!
    There's no reason why even Shroedinger should not have dock, though only good for small cargo containers and lesser drones.
    That is, if dock sizes are really checked and Ox will not try to dock here. ;)

Posted: Fri Aug 29, 2008 4:00 am
by chuck_starchaser
I've no idea how docks are coded; but if they are a class, as they should be, a simple private method bool check_it_fits(ship const & it) should do it.

Posted: Fri Aug 29, 2008 2:47 pm
by loki1950
because of deficiencies in the AI code it can't dock you may see AI controlled ships go through stations if there velocity is to great for capture.


Enjoy the Choice :)

Posted: Fri Aug 29, 2008 6:24 pm
by klauss
chuck_starchaser wrote:I've no idea how docks are coded; but if they are a class, as they should be
Hahaha*... you gave me a real laugh.

* Because VS always follows good OOP guidelines... right...

Posted: Fri Aug 29, 2008 9:35 pm
by chuck_starchaser
Alright, let me guess: ports are probably instances of "unit" and there's a "port flag" that identifies them as ports.
:o
Or is it even worse? :roll:

Posted: Fri Aug 29, 2008 9:45 pm
by loki1950
And that's where they are defined as well location and size 8) all part of a units stats you really must have a close look at units.csv :wink:

Enjoy the Choice :)

Posted: Fri Aug 29, 2008 9:48 pm
by mortaneous
"It's not what you think... it's much, Much worse"

I don't know the code myself, but just judging by how docking appears to work and the topics that have talked about docking issues on stations and large ships... it's probably worse... they're probably just co-ordinates on the mesh and docking is a matter of proximity to that point when requesting to dock.

Posted: Fri Aug 29, 2008 10:17 pm
by loki1950
it's probably worse... they're probably just co-ordinates on the mesh and docking is a matter of proximity to that point when requesting to dock.
Yeap that's exactly what happens and if those co-ords are inside the mesh good luck docking i've fixed a few stations with that problem :shock: the Factory model my first.

Enjoy the Choice :)

Posted: Fri Aug 29, 2008 11:58 pm
by Neskiairti
you know.. it just struck me..

docking objects..

you need like 3 objects.. for 3 different styles of docks..

so you got a ship? well stick a 'dock' on it as something like a turrets done.. subobject..

for stations its easier... just put a second object in space there, lodged inside the station (no collision detection or anything here)

could even automate it.. but anyhow.. <.< an object you can place would.. to me.. seem easier than other ideas.

Posted: Sat Aug 30, 2008 1:31 am
by klauss
I've had some very cool ideas on how to handle docks a while ago. But writing the software to produce the required anciliary data (navigation graphs) isn't as easy, but I'd gladly do it if writing an AI that will utilizes it wasn't outside my domain (I never could understand AI code).

Posted: Sat Aug 30, 2008 1:38 am
by chuck_starchaser
Couldn't be that difficult to write AI code from scratch. Probably much easier than try to understand the existing code. Maybe we can work on that after CineMut.

Posted: Sat Aug 30, 2008 1:58 am
by Neskiairti
thats something I would be interested in pitching in on... would get my feet wet a little before I start writing my own AI :P

Re: Docks (and Scoop)

Posted: Tue Nov 11, 2008 10:45 pm
by TBeholder
Also, if docks were just normal explicit sub-units (with some flag), auto-docking would be a bit easier to implement: sub-units have direction vector. Then once you placed dock so it points into free space, docking ship would just arrive at some point along that vector, then turn and move in, and unlikely to ram anything in process.