Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Diagonal/true line designations  (Read 1343 times)

Frugal

  • Bay Watcher
    • View Profile
Diagonal/true line designations
« on: February 07, 2008, 10:05:00 am »

With the advent of diagonal movement, diagonal designations are more useful.  Unfortunately, the designation tool still works in squares, making diagonal designations time consuming.  I propose a line-designation tool for this purpose.  Perhaps you could go a little farther, and turn the designation tool into true multi-point area selection.  For instance, you could dig out a triangle or rhombus easily if you could put down more than two vertices before filling in the area.
Logged

penguinofhonor

  • Bay Watcher
  • Minister of Love
    • View Profile
Re: Diagonal/true line designations
« Reply #1 on: February 07, 2008, 05:39:00 pm »

.
« Last Edit: October 28, 2015, 10:58:53 pm by penguinofhonor »
Logged

Karlito

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #2 on: February 07, 2008, 06:28:00 pm »

I saw this in another thread and someone swore that diagonal movement was already 1.4 times as long.
Logged
This sentence contains exactly threee erors.

penguinofhonor

  • Bay Watcher
  • Minister of Love
    • View Profile
Re: Diagonal/true line designations
« Reply #3 on: February 07, 2008, 06:30:00 pm »

.
« Last Edit: October 28, 2015, 10:58:59 pm by penguinofhonor »
Logged

Yobgod

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #4 on: February 07, 2008, 07:16:00 pm »

For many situations, it would be sufficient (and very useful) to be able to designate a single square and say "dig your way here".
Logged

Puzzlemaker

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #5 on: February 07, 2008, 07:45:00 pm »

It should take 1.4142 times as much to move.  At one point I calculated how much...

A.  Movement is "Lost" when you can't move diagonally directly in a grid based game, so you have to up-right-up-right or something.
B.  Movement is "Gained" when you do move diagonally
C.  Movement is "Lost" when you try to move at a certain angle in a hex-based game, where there isn't a flat edge.

During this process I ended up memorizing the square root of 2, which is 1.4142, the distance between two corners of a square, if the square is 1 unit long.

Logged
The mark of the immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one.

penguinofhonor

  • Bay Watcher
  • Minister of Love
    • View Profile
Re: Diagonal/true line designations
« Reply #6 on: February 07, 2008, 09:57:00 pm »

.
« Last Edit: October 28, 2015, 10:59:04 pm by penguinofhonor »
Logged

numerobis

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #7 on: February 07, 2008, 11:55:00 pm »

Ain't notin' wrong with the L_infinity norm.

At some point I worked out that dwarf diagonals are the same as rows and columns, but I forget what my methodology was.  Something about chasing a kobold I think. It convinced me at the time.

Logged

numerobis

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #8 on: February 08, 2008, 12:06:00 am »

quote:
Originally posted by Puzzlemaker:
<STRONG>It should take 1.4142 times as much to move.  At one point I calculated how much...

A.  Movement is "Lost" when you can't move diagonally directly in a grid based game, so you have to up-right-up-right or something.
B.  Movement is "Gained" when you do move diagonally
C.  Movement is "Lost" when you try to move at a certain angle in a hex-based game, where there isn't a flat edge.</STRONG>


There's a beautiful* field of computer science (and mathematics) called metric embeddings that studies just this kind of thing.  In a more obtuse setting, of course.  Questions like: if you really have metric A (like the euclidean plane), but you want to approximate it using metric B (like the grid), how much are you forced to distort distances?


* beautiful means it's both complicated and useless -- like number theory or quantum mechanics.

[ February 08, 2008: Message edited by: benoit.hudson ]

Logged

Fedor

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #9 on: February 08, 2008, 04:14:00 am »

As with so many thing, macros are your friend if you want to do diagonal designations.  See this wiki section (requires AutoHotKey; see top of that wiki page).


quote:
Originally posted by penguinofhonor:
<STRONG>I noticed that diagonals take just as much time to traverse, although on a grid they should mathematically take 1.41 times as much time to traverse, because moving along the hypotenuse of a right triangle is 1.41 times more distance, rounded of course.</STRONG>
My own study indicated that diagonal movement really does take longer.  The bit I don't understand is that, instead of the diagonal movement itself taking longer, the move immediately *after* it takes longer.  Not sure how that works...
Logged
Fedor Andreev is a citizen of the Federated Endeavor. He is a member of the Wandering Minds.

Draco18s

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #10 on: February 08, 2008, 03:13:00 pm »

Google says the speed of light = 6.52679909 × 1010 leagues per fortnight

Google is amazing, but I still haven't worked out how many camel days are in a lightyear.

Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Diagonal/true line designations
« Reply #11 on: February 08, 2008, 07:55:00 pm »

quote:

The bit I don't understand is that, instead of the diagonal movement itself taking longer, the move immediately *after* it takes longer.  Not sure how that works...

You are still moving on a grid, so whether you instantly move to the final square or whether it moves you there at some point during the delay period isn't all that important.  Right now, the unit moves, then it has to wait for the delay from that move to pass.  I could make it happen before or halfway through, but I'm not sweating it.  Anyway, yeah, diagonal moves take longer, by approximately 362/256.  The actual step times are only 10 or so, which doesn't multiply up very well, so there are some random elements to get it back to around 362/256, ostensibly, on average.

[ February 08, 2008: Message edited by: Toady One ]

Logged
The Toad, a Natural Resource:  Preserve yours today!

Frugal

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #12 on: February 08, 2008, 08:45:00 pm »

Well mostly it's useful for exploratory digging.  You reveal more tiles when digging diagonally than you would digging in an orthogonal direction.  Since it can be very time-consuming to find rarer metals, I use diagonals a lot.
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Diagonal/true line designations
« Reply #13 on: February 08, 2008, 09:26:00 pm »

quote:
Originally posted by Frugal:
<STRONG>Well mostly it's useful for exploratory digging.  You reveal more tiles when digging diagonally than you would digging in an orthogonal direction.  Since it can be very time-consuming to find rarer metals, I use diagonals a lot.</STRONG>

*Tests*
Huh, you're right.  I'd have though it'd be the same, but it isn't.
Ah, I know why.  Interesting.

Logged