Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8808975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:45:21+00:00 2026-06-14T02:45:21+00:00

This question appeared after the following consideration: consider the immense world map of a

  • 0

This question appeared after the following consideration: consider the immense world map of a MMOG like Travian or Tiberium wars. Even if they are 2D maps, they normally have a lot of different identities like player’s towns, terrain features and others.

How are those maps saved on a database? Is there an entry for every tile, with a foreign key to the identity which is at that position? Or is the other way around: each identity as two position attributes (x,y) which define its position?

In a more broad sense, my question is the following: what is the most efficient way to store a positional lattice (square tiles, hexagonal tiles, etc) on a mysql-like database? What is the bottleneck (if any) of making such a storage when querying the db for a position, or list of positions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T02:45:22+00:00Added an answer on June 14, 2026 at 2:45 am

    This is entirely dependent upon the scenario. For example, if the map is sparse, it might make sense to store the position of entities with coordinates in a single row. If the topology is irregular (i.e., there are arbitrarily many paths out of any given tile), then you might store it as a graph (i.e., separate “node” and “edge” tables, in a one-to-many configuration). You might decide to use continuous (e.g., real) coordinates for items in the database, and then simply partition those into logical “tiles” in the application.

    Similarly, the bottlenecks are going to be application-dependent. Do you regularly need to ask “what is presently around me?”, or are you merely asking “Can I get from here to there?”. If you had particular use-cases in mind, perhaps you could add more detail and we could attempt to provide more detailed answers.

    And as always in anything talking about performance, random speculation in the hypothetical case is never a substitute for prototyping and measuring.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem appeared after my last question here . I want to set each
After reading this SO question and noting the consensus about just how evil Thread.Sleep()
I'm aware that this question has appeared in various forms before, but none of
This question appeared when I recently opened a rather old driver for my raid
I know this question has appeared few times, but the things are changing really
(Please note that the behavior described in this question only appeared because of something
Okay, it appeared that I had an answer for this question, but I was
This question is directly related to this SO question I posed about 15 minutes
This question is kind of a follow up to this question I asked a
This question is really basic. What is the performance difference between removing a UIView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.