I'm helping make a game (written in Perl (that's why I posted it here)) and I'm trying to figure out how to store our map files. Our maps are a large coordinate plane and we'd like it to be able to have different kinds of terrain. One of our first ideas was to store all of our data in a large color-coded bitmap.

We'd like it to be able to tell us what the terrain for any coordinate, say (50, 72). If it helps at all, we are using the MySQL database to store most of our data. Mostly I'm looking for efficient ways to do lookup on our terrain so it doesn't take so much time.

Thanks so much.

-Ben Jacobs (dooberwah)
Homepage: http://dooberwah.perlmonk.org
PGP Public Key: http://dooberwah.perlmonk.org/mykey
"one thing i can tell you is you got to be free"


In reply to Map Storage For Game by dooberwah

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.