project-navigation
Personal tools

Author Topic: Moving  (Read 2538 times)

Offline Another Guy

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
Moving
« on: June 05, 2009, 10:03:59 pm »
It seems that when moving, pathfinding first do horizontal and vertical moves (2 TU), then diagonal moves (3 TU). I recall old X-COM do the opposite, and ends up more acurate to guess which direction the player wants the actor to be facing on the end of the movement.

Doing X-COM way would be an improvement, but I sugest a further improvement.

Pathfinding could count how many diagonals (3 TU) and straigh (2 TU) movements the actor will make (between obstacles and after last obstacle of course) and do the kind of movement that appears most on that movement section by last, thus "guessing" better the direction player will want the actor to face on the end of the turn. In case of a tie, end up with diagonal one.

This will make actor look a lot smarter, because the kind of movement that occurs on most of the pathfnding is generaly the direction actor should be heading on the end of turn.

odie

  • Guest
Re: Moving
« Reply #1 on: June 06, 2009, 07:30:52 am »
Ahem. My dear, its actually more logical to use 3 TU for 1 step diagonal (which makes sense according to pythagoras) instead of 4 TUs. Unless u wanna actor deliberately face one direction (to cover LOS) and then another to face the final position.

Plus, this is UFOAI. I believe i hear this before, and wanna remind all of us that this IS UFOAI, a different game INSPIRED by UFOAI (not doing a remake). So, hence, leave the developers some leeway on this, and having a fresh way to do things might just be different and who knows, more logical, practical, and fun! :D

Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: Moving
« Reply #2 on: June 06, 2009, 12:01:54 pm »
I think that has little to do with it. His point, I believe was to try to guess the desired facing in order to reduce micro. However, I don't think there's much of a relationship between the destination and the desired facing, and as such it's poinltess to add code to try to guess what the user had in mind.

Offline Another Guy

  • Squad Leader
  • ****
  • Posts: 239
    • View Profile
Re: Moving
« Reply #3 on: June 06, 2009, 07:51:32 pm »
Well, BTAxis got what i had in mind.

After thinking a long time about it, I think this would actually work just OK for the "guessing" like 90% of the time because when scouting the map, u wanna look most of the time on the same general direction direction u just moved. Doesnt seem hard to implement either.

Would really reduce (pointless) micromanagement of soldiers.