Re: looking for a hexagon tiling module

Discussion in 'Perl Misc' started by Mart van de Wege, Apr 8, 2012.

  1. Eli the Bearded <*@eli.users.panix.com> writes:

    > I'd like a module to manipulate co-ordinates on an X,Y plane that
    > have an overlapping hexagon grid. Consider, for example, a game
    > that uses a hexagonal grid to move around. Chinese Checkers (star
    > halma) is one such game. You would want functions to turn a mouse
    > click into a hexagon tile id of some sort, and you'd want functions
    > to calculate how to draw the tiles if the side is S pixels, or
    > if you want to fit N tiles across on a M wide field.
    >

    I've actually done the basic math to generate this using Cairo:

    http://mvdwege.wordpress.com/2011/07/07/math-for-fun/

    I still have to work out the rest of the code to really generate maps,
    and my final usage scenario is different from yours, but hopefully it's
    useful.

    Regards,

    Mart

    --
    "We will need a longer wall when the revolution comes."
    --- AJS, quoting an uncertain source.
    Mart van de Wege, Apr 8, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?U3JpZGhhcg==?=

    stretching the background image instead of tiling

    =?Utf-8?B?U3JpZGhhcg==?=, Nov 23, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    8,162
    Mats Lycken
    Nov 30, 2005
  2. Anders Thorsen Holm

    Re: Repeating a tiling image in a table cell

    Anders Thorsen Holm, Jul 15, 2003, in forum: HTML
    Replies:
    0
    Views:
    2,869
    Anders Thorsen Holm
    Jul 15, 2003
  3. Nik Coughlin
    Replies:
    9
    Views:
    382
    Jeremy
    Nov 28, 2007
  4. Simon Strandgaard

    [ann] prime-patterns; hexagon-0.1

    Simon Strandgaard, Oct 4, 2003, in forum: Ruby
    Replies:
    2
    Views:
    126
    Simon Strandgaard
    Oct 7, 2003
  5. Peter J. Holzer

    Re: looking for a hexagon tiling module

    Peter J. Holzer, Apr 7, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    631
    Peter J. Holzer
    Apr 7, 2012
Loading...

Share This Page