Docking: automate it.

Talk among developers, and propose and discuss general development planning/tackling/etc... feature in this forum.
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

klauss wrote:This would allow all sorts of autopilots (including NPCs AI) to successfully navigate around complex stations and, thus, realistically perform docking procedures.
I am going for something simpler. The basic idea is to have a queue of waypoints that the ship has to travel through when it docks.

For most exterior docking ports this queue is empty.

For most interior docking ports it sufficient to calculate a single waypoint by extrapolating the line between the center of the station and the docking port.

For a few docking ports (for example the interior ports on the Aera starfortress) we need something better. My idea was simply to add these waypoints by hand in the units.csv file. I have found a way to add these waypoints in a backwardscompatible manner.
klauss wrote:PS: If you have trouble visualizing the algorithm, I could try to draw some sketches.
Thanks for the offer, but that I understand your suggestion. My masters thesis was on navigation in dynamic environments.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Docking: automate it.

Post by klauss »

breese wrote:
klauss wrote:This would allow all sorts of autopilots (including NPCs AI) to successfully navigate around complex stations and, thus, realistically perform docking procedures.
I am going for something simpler. The basic idea is to have a queue of waypoints that the ship has to travel through when it docks.
Manual input would be doomed, we've had a hard time getting artists to properly place thruster exhausts and weapon mounts, let alone a full set of waypoints.

It would be better than nothing though.
breese wrote:
klauss wrote:PS: If you have trouble visualizing the algorithm, I could try to draw some sketches.
Thanks for the offer, but that I understand your suggestion. My masters thesis was on navigation in dynamic environments.
LOL, there was I trying to explain it to the master ;)

Ok, but if you're so familiar with it, why not go with the idea?

I know it's a lot of work, but you can't argue it's the way to go.

So... would you agree then, the goal is navigation graphs (to call them something), with an intermediate step of manually-crafted docking waypoints?

What I like about navigation graphs is that they would enable bigger and more complex stations to be populated with NPCs, say tug pods or things like that, that move realistically around the station. It would really give things new life.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

klauss wrote:Manual input would be doomed, we've had a hard time getting artists to properly place thruster exhausts and weapon mounts, let alone a full set of waypoints.
How are the docking ports placed?
klauss wrote:I know it's a lot of work, but you can't argue it's the way to go.
Well, it is certainly one feasible option.

Given that VS is mostly empty space with a few complex objects, another approach would be to use potential fields. This also works well with movable objects.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Docking: automate it.

Post by klauss »

Potential fields are OK for broad navigation, and in fact I believe the autopilot already uses something like that, using a simple linear probe until faced with a gravity well, and then using the gravity well as a repelling field (ie: it tries to escape or go round it).

Since most scapes in VS are so sparse and big, the technique of potential fields gets really simplified (you're at most influenced by one repelling or attracting field), and explicit representation of the map becomes prohibitive (too big, being 3D and spanning huge distances). In fact, I believe potential fields in VS wouldn't be a lot better than linear probes. If at all.

For close navigation, though, potential fields are inefficient. In order to account for the smaller interfaces, the 3D map of potentials gets really big. So I wouldn't consider them over navigation meshes.

So, remember, the navigation meshes only apply to the space nearby stations and significant units (units much bigger than the player/NPC). In-between those "complex spots", a simple linear probe (evading spherical significant units and their influence field) would work a lot better.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

Just to keep you updated...

Today I added waypoints to outposts, refineries, and relay stations. This means that I was able to auto-dock at an interior docking port for the first time.
Shark
Confed Special Operative
Confed Special Operative
Posts: 360
Joined: Tue Mar 02, 2004 9:34 am
Contact:

Re: Docking: automate it.

Post by Shark »

FYI, there are games where ships dock with carriers, so you could take look at them for some ideas of how it's done.

A bad example, but the docking animations (both entrance and exit) in Homeworld and its sequel are pretty smooth. (It's a bad example because you can't actually pilot any ships, lol. ;)) Plus, there's also lots of different animations depending on the type of ship, so you can observe a lot of examples at once without spending a lot of time.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Docking: automate it.

Post by klauss »

breese wrote:Just to keep you updated...

Today I added waypoints to outposts, refineries, and relay stations. This means that I was able to auto-dock at an interior docking port for the first time.
Cool... do you have any workable patch?
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

klauss wrote:Cool... do you have any workable patch?
Attached.

Please notice I have only attached auto-docking for the relay station, so you need to find one of those to try it out. You also need to add the following section to your vegastrike.config file:

Code: Select all

		<section name="test">
			<var name="autodocker" value="true"/>
		</section>
The auto-docker has been integrated with the autopilot now. What you do is select the relay station, hit 'd' to get docking clearance, and then 'a' to enable the auto-docking. You can abort the auto-docking by pressing the 'a' key again.

Waypoints are currently drawn as cyan boxes, but I am not sure whether or not they should be there (I needed them for debugging purposes.)

If you have no docking clearance, then 'a' toggle the autopilot on/off as usual.

You can dock manually in the usual way, i.e. moving inside a docking port and hit the 'd' key.
You do not have the required permissions to view the files attached to this post.
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

Now that the auto-docking AI is working, I have started integrating it into the game.

The docking computer will be an upgrade that can be bought in appropriate places. Should there be more docking computers?

For instance:
  • Trader docking computer: Docks at atmospheric planets and at exterior docking ports on some stations (e.g. agricultural, commerce, and diplomatic centers.)
  • Explorer docking computer: Docks at all planets and all non-military stations.
  • Military docking computer: Docks everywhere, including capital ships.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Docking: automate it.

Post by klauss »

I don't understand why would there be different docking computers. A docking computer is merely a rather simple autopilot, so how would one justify the differentiation?

In fact, if it were an upgrade, I'd expect it to be a rather low-end one (ie: cheap).
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: Docking: automate it.

Post by travists »

I like the idea of different autodocking computers, but don't think that planet/non-military/military is quite right. Perhaps they handle diffrent levels of complexity. It, being in essence, an upgrade to the autopilot, perhaps other advanced autopilot features become avalible with each computer. eg: advanced auto 1 docks when requested, aa 2 requests docking then docks , aa 3 can handle jumping as well as aa 2’s features... like Han Solo and the Millennium Falcon, with the right upgrades, the only time piloting is necessary is when there are obstacles to overcome. Alternatively, the efficacy and/or complexity of the docking capabilities would increase as the cost does. Another feature that one of the aa's might have is auto-disengaging when hostile craft close into weapons range. No more hitting the "a" key just to drop and fight! As to the cost; more features = higher price. It also seems that a true autodocking system would have: A more sensor interfaces, B a comm channel to the docking port's docking computer, C advanced course plotting logarithms, D more throttle tie-ins. Probably in line (price wise) with a low end repair droid. This isn’t a simple “look at the gravity wells and find the path of least resistance” not overly complex, but more than the ship’s stock computer can handle. Besides, to truly appreciate the feature, you should have to manually dock a time or two before you can pick it up. It should be a common upgrade though, as every pilot is likely to want the option.


***edit: Looking over your post again breese, a ship-ship docking computer would be very nice. Prefrebly it overrides the other ships AI too, so it is not gyrateing about in place while you try to dock! Would cost more though, as it's more features.
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: Docking: automate it.

Post by Deus Siddis »

Don't make it an upgrade at all, make it a default feature of the ship. Anything else is just crazy from every perspective:
  • Game Play. This upgrade doesn't affect balance or the player's effectiveness at doing anything. It's simply an interface convenience.
  • Believability, logic, common sense, etc. Autopilot software wouldn't cost anything in the VS universe. It's super simple, doesn't require any new hardware and you get an autopilot for your spec drive already, which also comes standard.
  • Maintainability. Another family of upgrades to clutter the csv files makes content development just that much more complicated and confusing.
Also where this feature really shines is in make the AI ships that populate the universe dock intelligently finally, instead of plowing through stations like senior citizen drivers. So then every ship not player owned should have all of these upgrades equipped, which is just that much more unnecessary content bloat.
charlieg
Elite Mercenary
Elite Mercenary
Posts: 1329
Joined: Thu Mar 27, 2003 11:51 pm
Location: Manchester, UK
Contact:

Re: Docking: automate it.

Post by charlieg »

Keep is simple. No upgrade needed. Not all bases support auto-docking and only allow auto-docking with friendly factions. "Clearance granted!"

Asteroids, wrecks, and other non-operational bases should require manual docking. That's where the skill comes into it! (Also in the future support boarding, again requiring manual docking.)
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

Something else this would come in handy with (and could actually be an upgrade for those hauling fighters in a cargo ship) is for the various carriers in the universe. This could make launch and retrieval of AI carriers easier to handle and could allow for a flight deck upgrade for the players ship (no more tractoring in the small squadron you hual around to handle pirates.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Docking: automate it.

Post by klauss »

Hey... I like charlieg's idea... a lot...
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
travists
Expert Mercenary
Expert Mercenary
Posts: 893
Joined: Thu Jul 08, 2010 11:43 pm
Location: Sol III North American Continent

Re: Docking: automate it.

Post by travists »

pheonixstorm wrote:Something else this would come in handy with (and could actually be an upgrade for those hauling fighters in a cargo ship) is for the various carriers in the universe. This could make launch and retrieval of AI carriers easier to handle and could allow for a flight deck upgrade for the players ship (no more tractoring in the small squadron you hual around to handle pirates.
YES!! The erstwhile Wing Commander Universe, and presumably Parallel Universe, have carriers, but are a bit of a hassle. Furthermore, any large transport in hostile territory is likely to have an escort. It would make sense for corporate freighters, and some well-off private ones, to have a small flight deck. Also, if the thoughts of some bases only having smaller docking ports are to be fully realized, an easy way to launch/land a smaller shuttle would be great. Another way to use carriers would be for the ultimate merc. You accept a job, fly in-system with your carrier, pick the best fighter for the job, take out the target, then land. Sure, you might be able to do this now, but docking bays would make it much simpler. With multi-ship support, paying to have your fleet shipped to you all the time would get expensive. A carrier option lets you have all ships ready when you are, but it would defiantly beg the crewing threads to get running!
Shark
Confed Special Operative
Confed Special Operative
Posts: 360
Joined: Tue Mar 02, 2004 9:34 am
Contact:

Re: Docking: automate it.

Post by Shark »

Keep is simple. No upgrade needed. Not all bases support auto-docking and only allow auto-docking with friendly factions. "Clearance granted!"

Asteroids, wrecks, and other non-operational bases should require manual docking. That's where the skill comes into it! (Also in the future support boarding, again requiring manual docking.)
Agreed.
Something else this would come in handy with (and could actually be an upgrade for those hauling fighters in a cargo ship) is for the various carriers in the universe. This could make launch and retrieval of AI carriers easier to handle and could allow for a flight deck upgrade for the players ship (no more tractoring in the small squadron you hual around to handle pirates.
Yeah, you shouldn't have have to tractor in ships that have functional navigation and/or pilots. Tractoring should be reserved for wrecks and other disabled ships.
Waypoints are currently drawn as cyan boxes, but I am not sure whether or not they should be there (I needed them for debugging purposes.)

If you have no docking clearance, then 'a' toggle the autopilot on/off as usual.

You can dock manually in the usual way, i.e. moving inside a docking port and hit the 'd' key.
What happens if multiple ships are trying to dock a the same time? In Homeworld for instance ships will form a nice line before taking turns following the docking waypoints.
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

charlieg wrote:Keep is simple. No upgrade needed. Not all bases support auto-docking and only allow auto-docking with friendly factions. "Clearance granted!"
As there seem to be some consensus about this suggestion, I am going to continue from here.

We can mark every single docking port on every station type as auto-dockable or not, so disallowing auto-docking on some stations is not going to be a problem. The question then becomes, which stations and capital ships?

Independently on how we select the stations and capital ships, there are some docking ports where auto-docking should not be allowed for practical reasons:
  • Each docking port has a size. If the ship cannot fit into the docking port, then we should not auto-dock there.
  • Some interior docking ports may be big enough, but the station entrance is not. The two interior docking ports on the outpost is an example of this.
  • If a ship is docked in a docking port, then it can block for other docking ports. For instance, confed starfortress has a couple of interior docking ports placed in a corridor, and if somebody is docked in the first then we cannot reach the others.
charlieg wrote:Asteroids, wrecks, and other non-operational bases should require manual docking. That's where the skill comes into it! (Also in the future support boarding, again requiring manual docking.)
Can you dock on asteroids and wrecks? What wrecks, btw?
Shark wrote:What happens if multiple ships are trying to dock a the same time?
First come, first served.

If we have selected a free docking port, and it becomes occupied by another ship while we are moving towards it, then we will select another free port. If there are no free ports, then auto-docking is disabled.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

Whats going up on svn, the code from page 6 or is there something newer?
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

pheonixstorm wrote:Whats going up on svn, the code from page 6 or is there something newer?
Definitely something newer. The review resulting in some changes, and I have fixed a bug.

Should we aim for the upcoming release or wait until later?

The biggest task left is to activate auto-docking for each docking port in units.csv and insert waypoints were needed.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

If you think it can be ready, this release. If not we can wait until the code is more mature
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

pheonixstorm wrote:If you think it can be ready, this release. If not we can wait until the code is more mature
Ok.

We also have to option of including it as experimental (ie. it must be enabled in test section of the vegastrike.config before it becomes active.)
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

Well, lets do it then. Add it in and do a quick write up for it so we can add it to a readme. I am still waiting to see if we have any other artwork that will go in. Don't know if fedorin will get back to me in time though. At least we have the new asteroids by deus :)
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: Docking: automate it.

Post by Deus Siddis »

pheonixstorm wrote:I am still waiting to see if we have any other artwork that will go in. Don't know if fedorin will get back to me in time though. At least we have the new asteroids by deus
I don't think I'll have any further artwork contributions ready for the next release. I have been working on a reboot of all the Purist craft and tech, but only the Consequence interceptor is anywhere remotely close to exterior modeling completion. And then there's interior modeling, UV and texturing.

I wouldn't worry about it though, since like Klauss said the next release will probably have to be v0.5.1. As long as we don't over promise and under deliver with a large version number, I don't think anyone will mind that we haven't made massive changes this time around. They'll just be glad that there is a release with some progress finally; that this project isn't dead. :)
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

Well, other than backend changes it would be nice to see a little extended functionality included. The new radar system is nice but not as noticeable as the new autodocking code. Which btw will also help on the backend with AI trading though I think we need a thread for it so klauss can spray his ideas out in a nice format instead of getting lost in this thread or another.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
Post Reply