Author Topic: [(p) fixed] worker mining issue in svn  (Read 1387 times)

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
[(p) fixed] worker mining issue in svn
« on: 27 March 2011, 09:43:07 »
This shows a ugly behaviour of workers while mining:

The worker has the command to harvest where the second picure shows it, but as you see he mines like shown in picture one.
The following picuters show the full cycle of the harvesting and as you see on the last picture he walks over to his mining place like shown in first picture, also his target arrow shows to the right piece of gold.

Some thoughts:
I think this has something to do with 1. mining logic and the way we select resources now. As the selection of a piece of gold results now in exactly one point on the map it maybe influences the pathfining. In this case you see all workers start trying to walk around the gold and harvest from the backside ( which is not what we want! ). Anyone has more thoughts/ideas for this?

( the map is "Ally Resists" and you play red .... )
« Last Edit: 27 March 2011, 17:04:25 by ultifd »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: worker mining issue in svn
« Reply #1 on: 27 March 2011, 11:38:01 »
( Please don't remove the double post its meant like this! )

If you select the 3 starting workers with double click and give them the command to mine gold on one piece of gold with right mouse button, all three workers have different target positions! Look them each target position shows a different position. Maybe this is the reason why he sometimes tries to reach the backside of the gold. (Or was it meant like this to avoid workers get stuck?)

The following shows this situation:
pic1 and pic2 show two workers which both got the same target ( but have different target pointers now )
in pic3 I gave the command again and as you can see it sometimes results in really ugly targets on the backside of the gold!

« Last Edit: 27 March 2011, 17:06:13 by ultifd »
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: worker mining issue in svn
« Reply #2 on: 27 March 2011, 16:05:33 »
The previous code (before the recent harvest fix this weekend) would tell the worker to harvest to the closest location of that type of resource. That logic resulted in workers always moving around because when blocked they find another closer target they can get to. You and others complained about this since workers would move more freely in order to be able to harvest when the area in congested. Now the current code will try to harvest where you click.. then if blocked they will look for best resource. If you click behind the resources.. how can we know you don't explicitly want the worker to go there and harvest, even though its far away (to avoid enemy detection for example)?

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,240
    • View Profile
    • http://www.titusgames.de
Re: worker mining issue in svn
« Reply #3 on: 27 March 2011, 22:28:56 »
The previous code (before the recent harvest fix this weekend) would tell the worker to harvest to the closest location of that type of resource. That logic resulted in workers always moving around because when blocked they find another closer target they can get to. You and others complained about this since workers would move more freely in order to be able to harvest when the area in congested. Now the current code will try to harvest where you click.. then if blocked they will look for best resource. If you click behind the resources.. how can we know you don't explicitly want the worker to go there and harvest, even though its far away (to avoid enemy detection for example)?

I think the behaviour you describe is completly ok, the problem is something else:  Look at the last picture, I did not click behind the resource! On the last picture I clicked the resource directly and the arrow was set like this automatically by MG, thats what is not normal in my opinion.
Lets talk about this in the chat I basically posted the pictures here to have a base to discuss.
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: worker mining issue in svn
« Reply #4 on: 29 March 2011, 01:48:13 »
Updated a change in svn, please try and see if this works better.