Ships Walls and Fly Throughs

Instead of programming the AI to recognize ship walls and react to them, how about just giving ships the ability to fly through other non-hostile ships, so long as they don't stop in the same square? It would still be possible to create ship walls, but they would be prohibitively expensive due to the number of ships required for such an operation.
452 views 8 replies
Reply #1 Top
Mentioned before: allowing ships of different races to peacefully coexist in the same square would avoid a lot of cheese problems, but it was decided that it involves a lot of work and causes other problems. So developers decided against it.

I read this in some other thread, which I cannot find now, but I think that was the reasoning.
Reply #2 Top
It is suprising this would require a lot of programming work, considering the routine probably already exists (for your own ships). But who am I to say? LOL

~SDC~
Reply #3 Top
Well one thing that would have to get fixed is the 'do you mean to do this' promt... as it is now when 2 races ships try to enter the same square and they are not at war the comp asks if you want to declare war. Za H's fix is maybe easier, call it tunneling or something maybe ;)

2 ships of different races can't occupy the same square, but races not at war, can tunnel their ships through other races ships. I've no idea if that's easier to code or not, but it seems like it could be :)
Reply #4 Top
Well, space is infinite, so going over ships technically shouldn't be a problem. :)

It would be tweaking the pathfinding/hit detection code so that it's smart enough to go over ships that aren't its target and make sure that it won't stay on the same spot that would be the problem.

I'm just finishing testing on a fix so that you can't trap the AI in their own stars anymore. :)

Reply #5 Top
Ubertaco put it in better terms I thinks. By allowing tunneling you don't have to deal with the war declaration checks or ships from different races occupying the same square. The current path finding routine only has to check if the destination point is valid and every obstacle in between can be tunneled for this to work.
Reply #6 Top
Well its not quite that simple Za H. The path finding routine still has to concern itself with hostile ships and planets. Also there might be odd cases where a ship can move past other obsicales, like anomalies and get a couple extra squares of movement out of this.

Still I think we're on the right track. Check to see if destination is normally reachable. If no, check to see if any hostile obsticals in the way. If no, check to see if anomalies are in the way...

That's pretty simplistic, and I've no idea how path finding is done in GalCiv, but the thought process seems logical enough...
Reply #7 Top
If you're interested, we're using a modified version of the AStar algorithm for pathfinding. The key to any algorithm is the function that you use to assign the weights to each node.

"Tweak" was probably an understatement in my previous post. It would require significant revision of the hit detection functions to allow ships to just go over each other, and more testing. It took me about two weeks to test the pathfinding code when I cleaned it up the first time, and there were still some bugs that I had to fix that the beta testers caught. I would like to iron out a few wrinkles when I get the chance.

Reply #8 Top
My opinion is that you should keep some of the ship walling tactics but get rid of others.

Surrounding planets, colonies, or resources to prevent your enemy from getting to them is a good strategy. It adds to the VERY LIMITED amount of tactics involved in the game. It's also balanced. While the AI can't do it to us, they make up for it by being able to see all stars and resources from the get-go.

Surrounding an enemy planet so they can't launch their ships, though...That should be taken out.

- Nobody