1
\$\begingroup\$

in a previous question asked here:how-to-create-a-hexagon-world-map @Tim Holt has provided code that does the job that i'm wanted to do, the only difference I would like is to have it as squares rather than hex. Is this easy to convert, or is there a better way? thank you.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ It might help to define the question in a more self-contained way, rather than simply making reference to another question. You don't need to exclude the link, but please write your question such that it's not absolutely necessary to read another question. \$\endgroup\$
    – Tullo_x86
    Commented Aug 15, 2011 at 3:10
  • \$\begingroup\$ So...you want a grid? \$\endgroup\$
    – Ray Dey
    Commented Aug 16, 2011 at 12:20

1 Answer 1

1
\$\begingroup\$

I didn't look too closely, but the code in that answer was heavily involved with hex calculations -- like figuring out where the mouse is pointing on the hex grid. This is trivial if the tile is a square, you wouldn't even need to examine this carefully. The same would be true for most of that code. So I suggest starting from scratch, but using the concepts / code you need from that example if you find yourself stuck.

Start with a 2 dimensional array, each element containing a value for the type of tile it is and which directly maps to actual tile images with a set width defined as a constant somewhere.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .