Docking: automate it.

Talk among developers, and propose and discuss general development planning/tackling/etc... feature in this forum.
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: Docking: automate it.

Post by Deus Siddis »

Boaal wrote: Gravity wells were HORRIBLE. I barely had any idea what was going on. My ship would just stop at random, and it was frustrating as all hell. As for being pulled out of spec by enemy craft – God yes.
Gravity wells countering SPEC is an important mechanic because it both prevents you from fatally colliding with planets at 97C before you have time to react and making interceptions very simple to execute. You only have to fly towards the thing you want to reach, the gravity-spec mechanic does the rest.

The problem is that random traffic was greatly increased in 0.5.0 and so auto spec was added and spec interception was effectively removed to compensate. These two changes have made spec travel a pointless, boring cutscene.

Better solutions are:
1) Make traffic more concentrated-- bigger transports moving in formations instead of sprawling lines between destinations.
2) Readable and accessible in-system map showing nearby traffic clusters so that they may be more easily avoided.
Black holes would be interesting; I think they’d be rather hard to implement gameplay wise, though. There’d have to be some hefty thought on how they worked.
I'd imagine they'd be deadly gravity traps that would serve as a nearly system-wide navigational obstacle and hazard. Reaching other wormholes in the system would require circumnavigation. Also, they'd be the source of understandably time-limited rescue missions, for high acceleration craft to recover the crews of larger craft falling into the black hole.
Asteroid belts, ships wrecks, etc would be brilliant. Dog fighting around scenery is a lot more intense than just space – you have a lot more to think about, a lot more to work with,
Exactly.

In addition, stations, during docking and launch approaches could provide this kind of gameplay as much as asteroids and capships. One of the bugs that prevents this from happening is how touchy stations are about you hitting them by accident with low yield weapons.

Also ship accelerations (and governors) are turned up way to high, as has been brought up before. This makes combat maneuvers around even the most colossal stations overly difficult, mostly ineffective and not satisfying.

These two imbalances prevents you from fighting opponents in and around stations, which could otherwise be a quite awesome thing.
I’m all for a lessening of the Radar scale, too. It does tend to take away a giant chunk of the suspense, the unexpected and the danger, if you know everything there is to know the second you get to a place.
Indeed. Nebulae would go even further with this mechanic. Within nebular systems, you'd be especially vulnerable to ambush, as radar range would be distinctly more limited within them.
Did anybody else think of the big ‘pyramid within a pyramid’ Rlaan things?
I think (but am unsure) that model was replaced by fendorin. It was never canon to begin with, just some legacy art.
I get bored and disheartened after another few missions because the gap is so ridiculously large.
My experience is exactly the same. And the gaps only grow worse. A Clydesdale is like what, 80 billion credits or so? There's no realistic way to achieve that much money in the game, so why even have it for sale to the player in the first place then?
Another thing is, once again this comes up, if I have my own self-built fleet of captured ships that do what I tell them to, whether it be 'follow me around the universe and protect my arse' (this would be great for hauling cargo) or 'Stay here and guard this system' or whatever, then I still, even if they're just a bunch of trashed Hyenas which I haven't had to funds to patch up yet (assuming I didn't sell them), feel like I'm making a significant gain and a significant step forward. This does somewhat relegate hired help to the back benches, but I feel that it's a more than fair tradeoff in the cause of a more enjoyable, less intimidating game.
It is something I've brought up in the past as well. In part because you can already do it, but in a convoluted way. You can buy a large transport, and then purchase as commodity cargo, fully operational vessels (as long as they take up less room than the available cargo space of course). Then in space you can launch them from your mother ship, aircraft carrier style, and they function as AI driven escorts that you can also take direct control over. It's a very nice feature, but why do you need a clumsy carrier as a go-between for owned, not hired escorts?

As for hired escorts, they are far, far too expensive for what they actually deliver. Their prices must also be lowered. With economical fees, they won't be put on the back bench.

Being able to capture vessels is I great idea as well, I agree. I foresee it being suggested quite a bit, after such a time as the walkable interiors feature is implemented. Since boarding and taking direct control through force of another vessel seems like a logical next step. Then further out, when it becomes possible to own and build stations and colonies, the ability to construct your own vessels in your factories will be a logical feature.

But for now, simply being able to have the ships in your regular fleet, fly with you under an AI pilot, who doesn't disappear or cost you cash, should definitely be an implemented feature, ASAP IMO.
Boaal
Hunter
Hunter
Posts: 93
Joined: Sun May 06, 2007 6:43 pm

Re: Docking: automate it.

Post by Boaal »

Personally I was very happy with the introduction of autopilot, it smoothed a lot of things out for me when I was just flying around trying to find a new system to inhabit and explore. It was vaguely frustrating having to fly in certain lines in an attempt to avoid the large pulls of planets (But then again there were a lot of jumps near to planets, which was frustrating, but I think they were mostly moved?). It's not perfect, but it serves as an easy travel device, because I can't really say that travel in 4.3 was much more fun than 5.0 - I think 5.0 was more fun because it got you to the action faster.

As for gravity wells, as long as i know what's causing me to go out of spec I'm fine with it. It's when I don't know, that it's really frustrating. Admittedly my memories of 4.3 aren't great, but I do remember just being pulled out spec in the middle of space and thinking "Whaaaa?"

But like we've all said, and I think agreed to a point, one fairly easy addition to make travel less boring would be to limit the radar drastically. Nebula could be very interesting, I know I've mentioned X3 before but the way they handled nebula was to put in a filter over the screen (as far as I could tell) and obscured the player's vision beyond a certain range. This varied from nebula system to nebula system, in some places it was very close and in others not to close. It was, however, a reason to fly very carefully, because giant cargo vessels and stations would just emerge through the mists and you'd have to get out of time compression and autopilot and do some quick manoeuvres to avoid hitting these things. Although this was frustrating to many people (there was a mod to remove the nebula fog) I found it very atmospheric and enjoyable.
The Twitching Pattern - http://www.last.fm/music/The+Twitching+Pattern
Have a listen.
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

Deus Siddis wrote:Indeed. Nebulae would go even further with this mechanic. Within nebular systems, you'd be especially vulnerable to ambush, as radar range would be distinctly more limited within them.
Finally a suggestion that can be implemented by with our current development capabilities.

The radar already jitters inside nebulae. It would be easy to reduce the radar range inside nebulae to X% of normal.

Then again, who travels around inside nebulae anyways? Most of them are far away from other interesting destinations.
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 »

breese wrote:
Deus Siddis wrote:Indeed. Nebulae would go even further with this mechanic. Within nebular systems, you'd be especially vulnerable to ambush, as radar range would be distinctly more limited within them.
Finally a suggestion that can be implemented by with our current development capabilities.

The radar already jitters inside nebulae. It would be easy to reduce the radar range inside nebulae to X% of normal.

Then again, who travels around inside nebulae anyways? Most of them are far away from other interesting destinations.

Well then, why not a reason to go into one?
A: gas collectors as an upgrade (to do some low level gas mining)
B: Derelicts (again)
C: unlisted jump points (If there are no maps until you go to a system, why are all jumps instantly seen when you're there?)

p.s. I've done some coding so I get the jump point thing from a practical standpoint, just not an in-game logical one
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: Docking: automate it.

Post by Deus Siddis »

breese wrote: Finally a suggestion that can be implemented by with our current development capabilities.
The radar already jitters inside nebulae. It would be easy to reduce the radar range inside nebulae to X% of normal.
Then again, who travels around inside nebulae anyways? Most of them are far away from other interesting destinations.
See this thread: Link

Because (real) nebulae are actually much bigger than a star system, it makes sense that they'd completely cover entire systems. In fact, I've never in my admittedly limited experience seen a space game that did it any other way, before VS.

So in the future, nebulae could and really should be very large and thus both encompass and divide important resources, destinations and travel routes. For the player, going around or through a nebula could be an important strategic decision. And the process of going through one could require a very different tactical approach than normal navigation.
strook
ISO Party Member
ISO Party Member
Posts: 461
Joined: Fri Sep 03, 2010 12:10 pm

Re: Docking: automate it.

Post by strook »

I have a shader ready that generates fogs. I wanted to use it only for clouds in the sky, but I could it also use for this. Just give me some time to complete the planet flight.
plz visit my vegastrike project branch here

plz support VegaOgre by donating to it!

My systems: Mac mini 1, 4gig RAM;
i5 Quad Core 2400, 300mbit WLAN, 1,3Tbyte HD, 60 GB SSD,
nvidia geforce 8400gs 512MB, 6gig RAM with Ubuntu 11.4,
win7 and hackintosh installed
greenfreedom10
Hunter
Hunter
Posts: 67
Joined: Wed Sep 29, 2010 3:06 am
Location: Lost in an adventure

Re: Docking: automate it.

Post by greenfreedom10 »

Deus Siddis wrote:Instead of skipping over gameplay that feels slow, we need to make that gameplay more dynamic and intricate and interactive. This will take a lot of work and time, implementing and adjusting numerous features to fill out the VS experience, but it's the only way. In short we need to think about adding, not subtracting gameplay (subtraction is basically what automation does).
This is an interesting thread with so many ideas, and I think Deus Siddis has made an excellent point.

Some want automatic docking, others don't. Perhaps we should consider that we have a universe to play with here, with multiple factions, authorities, planets, and stations, as well as ships and equipment. Docking could be dependent on any/all of those. In that way gameplay could be added rather than subtracted. (This is one thing I liked from the beginning about vegastrike: the universe is far more interesting and dynamic than oolite, the only other space-simulator game I have played.)

Some ideas:
- A special camera for docking or some equipment that shows a HUD wireframe overlay to help the pilot.
- More obvious docking areas (station art/models).
- Docking conversation handles where/how a ship docks, information to pilot, fees, and considers ship size, mass, and some player stats if available.
- Small stations simply can not handle big ships, so those just rely on shields.
- Stations might have docking areas on an arm to limit possible damage by a crash.
- A remote dock with its own sub-"main concourse", that includes a "take shuttle to main station" clickable. Cargo purchased/sold is transferred for a fee.
- Auto-docking equipment becomes available and some of the big stations begin to require it.
- Some authorities/stations require docking permits for a price which goes toward an accident fund.
breese
Bounty Hunter
Bounty Hunter
Posts: 152
Joined: Thu Sep 02, 2010 8:00 pm

Re: Docking: automate it.

Post by breese »

greenfreedom10 wrote:Some ideas:
- A special camera for docking or some equipment that shows a HUD wireframe overlay to help the pilot.
Good idea. In fact, I already have a running prototype with the wireframe overlay idea (or rather some variant of it.) Still needs a lot of work though.
greenfreedom10 wrote:- More obvious docking areas (station art/models).
- Docking conversation handles where/how a ship docks, information to pilot, fees, and considers ship size, mass, and some player stats if available.
There is a quest built into the game, where you will witness a docking dispute between two ships, and you can decide to intervene or stand down. While this was a great experience, you will unfortunately only encounter this dispute once. It may be a good idea to make a more general docking dispute script with more variation, so that we encounter this problem from time to time, just as we sometimes can come across battles between two factions.

In fact, I think that we could enhance the game experience significantly by adding similar episodic scripts that occur spontaneously and where you can decide whether you want to intervene or not. A week ago I posted an example of this, where pirates try to steal your cargo at jump points. Unfortunately nobody has even bothered to download the script yet.
greenfreedom10 wrote:- Small stations simply can not handle big ships, so those just rely on shields.
- Stations might have docking areas on an arm to limit possible damage by a crash.
- A remote dock with its own sub-"main concourse", that includes a "take shuttle to main station" clickable. Cargo purchased/sold is transferred for a fee.
- Auto-docking equipment becomes available and some of the big stations begin to require it.
- Some authorities/stations require docking permits for a price which goes toward an accident fund.
All good ideas. I especially like the idea about docking fees. We could also have toll fees at jump points in some systems.

Another approach to auto docking could be to have docking zones that are located further out from the station. If you enter such a zone then you will be autopiloted to the docking port. I am already experimenting with a prototype for this.
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 »

breese wrote: I especially like the idea about docking fees. We could also have toll fees at jump points in some systems.
I've been wondering about something like this. My first thought was jump rings, like in Privateer 2. Man made wormholes set up in rings to fly through, at a cost, traversing several standard jumps. But now I'm wondering if the jump buoy on some more heavily trafficked systems can initiate a jump for you? Likely via a comm request. And at 100 credits a jump your own jump drive would pay for it's self. Never the less, as a pilot is starting out it would make life easier. Docking fees w/ the appropriate inputs to the script would allow one of the hassles talked about in getting crew up and running to be taken care of. It also makes since in a parking meter/ paid parking lot way. Most places where parking is limited fees are involved. In multi-player fees may accrue for each day you stay docked. In single-player, the only option for now, perhaps there could be a "stay the night" option at most bases. This would reset the missions and bar fixers, add to any commodities that are less than default amounts, and cost additional docking fees.
Deus Siddis
Elite
Elite
Posts: 1363
Joined: Sat Aug 04, 2007 3:42 pm

Re: Docking: automate it.

Post by Deus Siddis »

breese wrote:Unfortunately nobody has even bothered to download the script yet.
Send it in to phoenixstorm to have it included in what will probably be a near future beta release. Betas are how you get testing done.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

I have probably read the thread in question but never saw the script.. what thread is it and I will grab the script and play with it.
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 have probably read the thread in question but never saw the script.. what thread is it and I will grab the script and play with it.
Over Here.
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 »

Deus Siddis wrote:That's like saying modern air travel is unrealistic, because the guys in the control tower should land airliners via remote control.

Such would be way more hazardous and complicated and not very realistic at all.

Automation should only take over at the very end of the docking procedure when the ship has reached a stop very close to a docking zone, which is basically how the game already does it.
If airplanes flew in zero-G with no atmosphere I bet airliners *would* be controlled via remote. A better comparison might be with large ocean going vessels where I bet there *is* computer-aided maneuvering in certain situations.

I agree with the original poster. Docking AI would be great.
Better solutions are:
1) Make traffic more concentrated-- bigger transports moving in formations instead of sprawling lines between destinations.
2) Readable and accessible in-system map showing nearby traffic clusters so that they may be more easily avoided.
1) Yeah, it might be a good idea to have transports spawn inside guarded flotillas instead of individually. Further, some sort of traffic management might be a good idea, so that ships going one way stay in the "right" lane, and ships going the other way stay in the "left".
2) The map definitely needs to be overhauled, and there need to be more indicators in general. For instance a contour map showing the strength of gravity, as well as an indicator showing the local ecliptic.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

The problem with changes to the 3Dmap are with certain mods such as Privateer that have to display the map a certain way to keep the look of the game the mod is based on. Its the same with auto docking. In the privateer mods ships do not have to manually dock with a planet or base, the game just docks the players ship at a certain range. You get close enough to the base and you hear "now entering automatic landing zone" and after that the bases landing screen comes up.

So any changes to the map or landing code must stay compatible with what is required for the privateer mods.
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:So any changes to the map or landing code must stay compatible with what is required for the privateer mods.
This raises an interesting question about just how much the mods should be allowed to restrict the further improvements of VS.

Personally, I would like to have a game event system with events like docking/undocking, jumps, collisions, near-collisions, etc. This way the mods could hook in their specific behavior. The Privateer landing could then be a reaction to a near-collision event. This way we do not have to maintain that code for them. It would also allow us to cut down on the huge amount of configuration options (many of which do not work in the first place.)

Likewise, the network code could be built on top of this event system rather than permeating the entire codebase as it does today. The same could be done with lots of other features.

Getting back to auto-docking, today I managed to make a docking computer that works... well, sort of, it cannot dock on planets yet, and it gladly will move through the station walls to get to the docking port.
greenfreedom10
Hunter
Hunter
Posts: 67
Joined: Wed Sep 29, 2010 3:06 am
Location: Lost in an adventure

Re: Docking: automate it.

Post by greenfreedom10 »

breese wrote:It would also allow us to cut down on the huge amount of configuration options (many of which do not work in the first place.)
I agree! Trying to understand/use the config file to set up vegastrike (especially fine-tuning for my low-end integrated intel graphics) is nearly impossible with a disorganized default config and many extra, undocumented or seemingly overlapping config options. But I guess that belongs in another thread.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

I think the config file could take up a whole forum by itself lol

As far as the config file is concerned.. what is first needed is to move all changes from setup into the game itself and have an options page. That way we can split the config options into the appropriate sections. Video, Sound, Keyboard/mouse/joystick, and maybe camera.. or have camera options under video. The only thing we should eventually need to use setup for is hardware testing to determine default values for video by polling the graphics card on what it can handle.

On to auto dock... tell me more oh great breese about the code you have invented! Only automated base docking is really needed. We don't have to worry about crashing into planets ;)

Oh, and as for the mods... I think VS was written for both UTCS (the VS game) and Privateer so splitting out sections of priv code needs to be done delicately.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
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:As far as the config file is concerned.. what is first needed is to move all changes from setup into the game itself and have an options page. That way we can split the config options into the appropriate sections. Video, Sound, Keyboard/mouse/joystick, and maybe camera.. or have camera options under video. The only thing we should eventually need to use setup for is hardware testing to determine default values for video by polling the graphics card on what it can handle. ... Oh, and as for the mods... I think VS was written for both UTCS (the VS game) and Privateer so splitting out sections of priv code needs to be done delicately.
Agreed on the config setup, ideally most hardware options and many game-play options (joystick flight mode/reversed operation, difficulty, collisions, key mapping) can be set by an in-game screen. The engine specifics will determine if it can be changed mid-flight, or only at the main menu.

To the point of mod friendly, VS purports to be both a game and an engine. Therefor, a wide verity of mod friendly features needs to be in place. Using docking as an example, three modes should handle most desires: the present VS model, the proposed autopilot into the docking port model, and a privateer stile docking animation when closer than a given distance model. Space flight reality should be able to range from highly stylized to a "space X" type uber-realistic, mostly by changing thrusting and gravity wells.

The thread seems to have moved beyond "should we", but I have a thought I've been kicking around. Some posts back there was mention of needing to be vulnerable during the docking faze. I can think on no more vulnerable feeling than being on computer guided final approach and only having your turrets to ward off attackers. Override the controls to engage, and you have to start all over again; sit there and you may die before coming all the way in.

Planets should need auto-docking too, but after atmospheric flight has bee worked out. Come in too steep and you burn up. Too shallow, you bounce off the atmosphere. Sure, you could do it manually. But, without at least guiding boxes to show you the proper angle, you're likely to die in the attempt. At present though, flying within a given distance with you "I want to dock" flag set can hand you off to planetary transition control.
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 »

breese wrote:
pheonixstorm wrote:So any changes to the map or landing code must stay compatible with what is required for the privateer mods.
This raises an interesting question about just how much the mods should be allowed to restrict the further improvements of VS.
+1

Very important point.

I think the issue here is that where certain games need their own specialist modes of a particular aspect/feature, these modes should really be a bit independent of the VS mode. They should share code where obvious, but be implemented in parallel rather than overlaying (and thus depending on the behaviour of) the actual VS feature.

(I almost sound corporate there, I really could make up things for a living!)
Free Gamer - free software games compendium and commentary!
FreeGameDev forum - open source game development community
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:
pheonixstorm wrote:So any changes to the map or landing code must stay compatible with what is required for the privateer mods.
This raises an interesting question about just how much the mods should be allowed to restrict the further improvements of VS.
Right now, the "mods" are the most prominent use of the engine. Protecting them is paramount.

Development in VS shouldn't stymie due to mod compatibility, but mod compatibility must be given some (high) priority because they're the whole point of the existence of the engine as a separate entity to the game: to support mods.

And, dare I point out, privateer mods are even more popular than VS itself.

The event system does sound nice, but care must be had into how it is implemented. Most of the event system will have to be applied to all NPCs in a system, which in VS UTCS it can amount to a huge number, and so it must be efficient.

Running python scripts to handle an event is not efficient.

Implementing a C/C++ plugin system isn't easy.

So, in essence, it must be designed with care. If python scripting was to be used to handle some events, those events should happen rarely even in heavily populated systems.

PS: will answer other concerns once I get home :)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

travists wrote:But, without at least guiding boxes to show you the proper angle, you're likely to die in the attempt. At present though, flying within a given distance with you "I want to dock" flag set can hand you off to planetary transition control.
This is actually a good idea even for bases. Once you hit say 1000 meters the docking system pops up on the hud with the guiding boxes along with speed changes for the player to change. I don't think its possible right now but would look good (especially planetary) and might make the player forget about complete auto docking or privateer style auto docking.
Because of YOU Arbiter, MY kids? can't get enough gas. OR NIPPLE! How does that mkae you feeeel? ~ Halo
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 »

The coding to calculate the approach would make for an even smoother auto-dock on an installation so equipped as well. Each box would be interpreted as a waypoint with speed settings for the autopilot. So, you could fly in solo, request approach vectors and land manually, or hit “auto” and let the computer do it. Completely pilot’s preference, I’m sure base admin has a preference as well J

Glad you liked it, pheonixstorm.
pheonixstorm
Elite
Elite
Posts: 1567
Joined: Tue Jan 26, 2010 2:03 am

Re: Docking: automate it.

Post by pheonixstorm »

Ok, breese, do you think you can code up some guide planes into your auto dock or docking code for a manual approach? If you get the meaning of it anyway. If not I may be able to whip up something in pictures ;)
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 »

Actually, something like that has always been in my mind for NPCs.

But it needs extensive metadata, in the form of navigation maps.

What am I talking about?

Imagine we could create a graph, with nodes representing spheres of free space around stations, and interdicting spheres being connected by edges. It's a cousin of the navigation mesh well explained here.

Finding your way around the station involves deciding an entry point (conceivably, the node closest to you), a path around the graph that takes you to an exit point (conceivably, the farthest in the direction you're travelling, or one that takes you to your selected docking area), and then computing the maximum safe speed of entry to the computed path.

Computing the set of nodes isn't easy, but with the help of a collision library like opcode it could be accomplished. I could try to code such a tool for mesher, it should be done offline and not at load time, since it might be quite time-consuming.

After the set of nodes has been computed, finding a path from two nodes is done rather easy either with BFS search or with Dijkstra's algorithm (depending whether we want to minimize waypoints or distance travelled).

This would allow all sorts of autopilots (including NPCs AI) to successfully navigate around complex stations and, thus, realistically perform docking procedures.

It's NOT a small coding task, but I believe it's a prerequisite for any kind of decent AI.

PS: If you have trouble visualizing the algorithm, I could try to draw some sketches.

PS2: Navigation meshes are indeed better, but a lot harder to code in a fully 3D environment (you have to define free volumes, not areas). If anyone's willing to try, though... by all means ;)
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 »

pheonixstorm wrote:I think the config file could take up a whole forum by itself lol
Indeed.

Actually, my concern is not so much the layout of the config file, but rather how the huge amount of settings makes the code difficult to understand and change.
pheonixstorm wrote:On to auto dock... tell me more oh great breese about the code you have invented! Only automated base docking is really needed. We don't have to worry about crashing into planets ;)
Let the code do the talking ;-)

I have attached my current autodocking patch. Please notice that this is not a contribution for the current release.

In addition to applying the patch you also have to add src/cmd/ai/autodocking.h and src/cmd/ai/autodocking.cpp to your Makefile.am or CMakeLists.txt (right next to src/cmd/ai/docking.h). I was unable to include this change in the patch because my boost 1.45 patch (which changes these files) has not been committed to svn yet.

After you have rebuilt the program with this patch, you must add the following to your vegastrike.config to enable it.

Code: Select all

		<section name="test">
			<var name="autodocker" value="true"/>
		</section>
Press "d" to toggle the autodocking on/off (just like the autopilot). It also works with planets now.

You can only dock at exterior docking ports, and I strongly suggest that you place yourself in the line-of-sight of the nearest docking port before you activate the autodocker.

The code is still experimental, and it does not always work.
You do not have the required permissions to view the files attached to this post.
Post Reply