Jump to content

Move at an diagonal first, rather than at the end of the movement.


RBrim08

Recommended Posts

When a Xenonauts moves at an diagonal at any point in their movement, they will move straight as far as possible before moving at that diagonal. This can cause some problems sometimes, like when running in that manner causes them to get caught up in reaction fire. Since I, and I imagine most people, target a spot behind cover when moving, it would be better for them to move at diagonal first and then moving straight, which will probably put them behind the cover regardless.

Link to comment
Share on other sites

That'd be hard to implement, simply because the pathing algorithm probably looks for the lowest TU cost move. Because moving along the edges of the squares costs less than traveling corner to corner, it'll always choose the lowest TU option first; that is, move forward. Then, once the algorithm decides it can't travel forward any more without needing to travel to the side (not diagonal, but left or right) to reach its destination, it will do the more costly diagonal moves.

That being said, I like the idea. Alternate pathing algorithms are one thing I'd really like. For example, one that automatically avoids "hazardous" tiles, and would make you walk around fire, toxin gas (coming soon, I hear), stun gas, etc.

Link to comment
Share on other sites

I think you misunderstand the question. In any case, the TU's used should be the same whether you go diagonal in the beginning or at the end.

Going around things isn't going to happen automatically. There's no penalty to making your moves in segments, so it's better to leave it to the player's choice than any algorithm that will necessarily be suboptimal because it can't address every kind of situation.

Link to comment
Share on other sites

I don't think he did misunderstand. It's obvious to a human that the TU cost is the same, but implementing that in code is much more difficult. How will the computer know which path is safer? What if I want to move straight first--using some piece of cover such as a building--and only come out from behind at the end of the move?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...