Home » MODDING HQ 1.13 » v1.13 General Development Talk » Diagonal movement (curios why it costs more...)
Diagonal movement[message #350704] Wed, 23 August 2017 00:55 Go to next message
Sniki Hor

 
Messages:11
Registered:August 2006
Location: Croatia
What is the logic behind diagonal movement (NE, WS..) taking 50% more APs than direct (NS, EW)?

For me (behind the monitor) 20 tiles diagonal is bigger distance than 20 direct (is direct right word?) but for character inside the game 20 tiles is 20 tiles in any direction, there is no diagonal for them.

Another "problem" I see is that gun ranges are measured in tiles so there is difference between those 2 distance measurements.
This can be easily abused against AI which in my knowledge can't comprehend difference between diagonal and direct movement so if you want to approach faster to AI you could pre-position yourself NSEW from their position but if you have long range weapons like snipers and want them to get to you then go to SE, NW etc. and they'll need more APs to get to you giving you more time to snipe them out especialy in aimnas. And they don't know how to use that against you.

Am I missing something here?
Re: Diagonal movement[message #350705 is a reply to message #350704] Wed, 23 August 2017 01:13 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3767
Registered:July 2009
Diagonals are longer because basic geometry says so. All relevant functions account for that fact.



Chat with us!
#bearpit on IRC
Discord
Get your latest 1.13 Builds
(Pls don't use my forum PMs for general game queries)


Re: Diagonal movement[message #350707 is a reply to message #350705] Wed, 23 August 2017 04:03 Go to previous messageGo to next message
Sniki Hor

 
Messages:11
Registered:August 2006
Location: Croatia
And as I explained, diagonals as basic geometry are absolutely different in JA2 game dimension and our dimension so what was the point?
Re: Diagonal movement[message #350710 is a reply to message #350707] Wed, 23 August 2017 06:16 Go to previous messageGo to next message
SharkD

 
Messages:362
Registered:July 2003
Has the game always had diagonal movement? For some reason I don't remember it.



Homepage: http://isometricland.net
Re: Diagonal movement[message #350711 is a reply to message #350707] Wed, 23 August 2017 10:25 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3767
Registered:July 2009
Sniki Hor wrote on Wed, 23 August 2017 03:03
And as I explained, diagonals as basic geometry are absolutely different in JA2 game dimension and our dimension so what was the point?
No they aren't? What even gave you that idea?
SharkD wrote on Wed, 23 August 2017 05:16
Has the game always had diagonal movement? For some reason I don't remember it.
Yes.



Chat with us!
#bearpit on IRC
Discord
Get your latest 1.13 Builds
(Pls don't use my forum PMs for general game queries)


Re: Diagonal movement[message #350713 is a reply to message #350711] Wed, 23 August 2017 16:56 Go to previous messageGo to next message
Czert

 
Messages:105
Registered:August 2007
Well, sniki, geometry works in game as in RL, since in game your diagonal movement is based on DISTANCE traveled, not on "fixed amount of steps per title".
as you pointed out, in RL you are moving in circles, not cubes(sqares), so if try to move in RL on imaginary titles, then you reach center of them only if you move N,S,E,W, if you move e.q. NE, to reach center of them you have to do more steps.
Re: Diagonal movement[message #350714 is a reply to message #350711] Wed, 23 August 2017 16:56 Go to previous messageGo to next message
oak43

 
Messages:13
Registered:August 2017
is it really 50% as in 1.5 ? funny, i've never factored the difference.
Re: Diagonal movement[message #350715 is a reply to message #350714] Wed, 23 August 2017 17:57 Go to previous messageGo to next message
DepressivesBrot

 
Messages:3767
Registered:July 2009
oak43 wrote on Wed, 23 August 2017 15:56
is it really 50% as in 1.5 ? funny, i've never factored the difference.
Yeah, it is. The numbers for moving a tile are just too small to use the actual factor, which would be 1.41...
Gun range on the other hand is properly calculated as sqrt(a²+b²), so if you go 10 tiles straight down it'll show as 14 for shooting distance.



Chat with us!
#bearpit on IRC
Discord
Get your latest 1.13 Builds
(Pls don't use my forum PMs for general game queries)


Re: Diagonal movement[message #350719 is a reply to message #350715] Thu, 24 August 2017 02:01 Go to previous message
oak43

 
Messages:13
Registered:August 2017
right, i was just thinking that! i always assumed it was the hypotenuse.

crawling diagonally is so expensive, but it really wont matter in short distances if the actual value was more precise.


12*1.5 = 18

12*1.414 ~= 17
Previous Topic: Avatars
Next Topic: Question regarding future updates.
Goto Forum:
  


Current Time: Thu Sep 21 02:37:47 EEST 2017

Total time taken to generate the page: 0.00855 seconds