.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $6.00

   







Go Back   .com.unity Forums > The Camo Workshop > WinSPMBT
Notices


Reply
 
Thread Tools Display Modes
  #1  
Old September 13th, 2011, 10:16 AM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Bug Route planning algorithm

While enthusiastic about the game, I have encountered quite a many times a bug in the route planning algorithm when you click to the target hex, mostly involving building or water hexes. Tanks like to take the drive thru like they were at McDonalds and water hex movement point consumption (as well as in some other cases but I haven't been able to isolate) differs between the plan (bright hexes) and the actual result (troops run to water and are then "out of movement points." Minor case is that sometimes they have points to go to the firm land but are shown as not eligible to go there.

In my running PBEM game I had a MTP-70 which for reasons unknown decided that the shortest route between two points isn't a line drawn between them but first we should crash in to a building (in waterline hex) and then get stuck there. Bizarrely the first move was to hex down and right when I clicked the leftmost hex it could reach. Also with MTP-70 the bridges seem to consume movement points just like I would drive my troops to land.

I can provide you examples where route plan goes wrong in saved games if you need, but here's the list of what I have found so far:

- Tanks especially like to drive to the buildings even when other routes are faster (there's a road around the house).
- Units treat water hexes as they were roads in the route plan and then the unit fails to reach the target destination clicked. Maybe adjust the algorithm so that the unit which is on land will count the water hex as (Movement Points / Water Movement Points), so a unit with MP 20 and WMP 4 would treat the water like it consumed 5 points of movement.
- The reachable hexes in above situation fails. Sometimes there are hexes you can go but are not marked as such. Occasionally in other situations when there are units, holes in the roads and lot of action the promised movement is more than the final result after clicking the hex, but I am unable to isolate the issue.
- Some boats require additional movement points (A LOT!) when moving thru hexes that have bridges.
+ Wish: When moving the unit, show planned path (when mouse is held on top of the target hex) and possibly warn if the route involves rough slopes or crashing thru buildings. For example, the planned route is shown with a dark gray dashed line, which will turn red if the route involves a hex that could possibly get the unit stuck.
Reply With Quote
  #2  
Old September 13th, 2011, 11:20 AM
void1984's Avatar

void1984 void1984 is offline
Corporal
 
Join Date: Aug 2010
Posts: 196
Thanks: 94
Thanked 19 Times in 14 Posts
void1984 is on a distinguished road
Default Re: Route planning algorithm

Just be glad you haven't used "All formation movement" mode.
Reply With Quote
  #3  
Old September 13th, 2011, 02:32 PM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Default Re: Route planning algorithm

Quote:
Originally Posted by void1984 View Post
Just be glad you haven't used "All formation movement" mode.
I learned quick to not use that.
Reply With Quote
  #4  
Old September 13th, 2011, 02:34 PM
Imp's Avatar

Imp Imp is offline
General
 
Join Date: Jul 2008
Location: Uk
Posts: 3,308
Thanks: 98
Thanked 602 Times in 476 Posts
Imp is on a distinguished road
Default Re: Route planning algorithm

Never really suffered from building problem though admit there is an issue with water & paddyfields if have amphib capability. The solution is to split the move up doing it in 2 or 3 shorter stages, tend to do this in most cases anyway as gives you more control.
__________________
John
Reply With Quote
  #5  
Old September 14th, 2011, 02:12 AM
Suhiir's Avatar

Suhiir Suhiir is offline
Lieutenant General
 
Join Date: Apr 2007
Location: Salt Lake City, UT
Posts: 2,829
Thanks: 542
Thanked 797 Times in 602 Posts
Suhiir is on a distinguished road
Default Re: Route planning algorithm

I long ago learned not to let vehicles auto-route in urban terrain because they prefer to go thru buildings rather then around them.
__________________
Suhiir - Wargame Junkie

People should not be afraid of their governments. Governments should be afraid of their people.

"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." - Albert Einstein
Reply With Quote
  #6  
Old September 14th, 2011, 08:14 AM
DRG's Avatar

DRG DRG is offline
Shrapnel Fanatic
 
Join Date: Mar 2005
Location: GWN
Posts: 12,493
Thanks: 3,965
Thanked 5,702 Times in 2,814 Posts
DRG will become famous soon enough
Default Re: Route planning algorithm

Quote:
Originally Posted by Imp View Post
Never really suffered from building problem though admit there is an issue with water & paddyfields if have amphib capability. The solution is to split the move up doing it in 2 or 3 shorter stages, tend to do this in most cases anyway as gives you more control.
EXACTLY
Reply With Quote
  #7  
Old September 30th, 2011, 02:05 AM

dmnt dmnt is offline
Sergeant
 
Join Date: Jan 2010
Location: Espoo, Finland
Posts: 359
Thanks: 56
Thanked 136 Times in 104 Posts
dmnt is on a distinguished road
Default Re: Route planning algorithm

Unfortunately that only alleviates the problem but is not a complete workaround. In many cases even the short route might go haywire especially with water/bridge hexes.

I personally - as a software developer - know the pains of going thru old and buggy code and in this case it's something that's probably always been there - but couldn't you guys implement for example something easy but computationally inefficient like Djikstra's algorithm as the computing power these days shouldn't be a problem? The very source of the problem lies with the movement point calculation differing between the route plan cost (bright hexes) and the actual movement cost. This is also bad in cases where you think you can move your troops to the cover of the forest and then find out that the route planner promised you more than it can deliver and your troops are sitting (or running) ducks in the open for the opponents next turn.
Reply With Quote
  #8  
Old September 30th, 2011, 04:36 AM
Mobhack's Avatar

Mobhack Mobhack is offline
National Security Advisor
 
Join Date: Mar 2005
Location: Dundee
Posts: 5,956
Thanks: 465
Thanked 1,899 Times in 1,237 Posts
Mobhack is on a distinguished road
Default Re: Route planning algorithm

Quote:
Originally Posted by dmnt View Post
Unfortunately that only alleviates the problem but is not a complete workaround. In many cases even the short route might go haywire especially with water/bridge hexes.

I personally - as a software developer - know the pains of going thru old and buggy code and in this case it's something that's probably always been there - but couldn't you guys implement for example something easy but computationally inefficient like Djikstra's algorithm as the computing power these days shouldn't be a problem? The very source of the problem lies with the movement point calculation differing between the route plan cost (bright hexes) and the actual movement cost. This is also bad in cases where you think you can move your troops to the cover of the forest and then find out that the route planner promised you more than it can deliver and your troops are sitting (or running) ducks in the open for the opponents next turn.
The "route planner" part of the code has always "lied" - it especially gets confused by water movement since that uses a totally different system from land points. Plus it makes the map look rather weird, with the unit surrounded by a bright area in a sea of dark hexes, IMHO. And yes, we have looked at the algorithms used by the function, and improved it some (it used to get discommoded by mere bridge hexes originally and I recall curing or at least improving? that bit after the loss of some hair 4 or 5 years back).

Just do as I have done since SP came out - simply turn that "feature" off and ignore it completely. Move things one hex at a time, and get to know the capabilities of your units.

Andy
Reply With Quote
Reply

Bookmarks

Tags
boats, bug, moving, path algorithm, water


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 03:49 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.