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 4172534
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:34:28+00:00 2026-05-21T00:34:28+00:00

I have been chewing on this for a while and I thought I would

  • 0

I have been chewing on this for a while and I thought I would open a question up and try to get some ideas about it. Maybe something will spark a light bulb.

I need to build a hex grid and that hex grid will be a minimum 10 x 10 and a maximum 500×500 – and possibly bigger. This is obviously a massive grid at the top end and will naturally have to be broken down.

Here is the bulk of the problem.

  • 500×500 grid of hexagons. approx.
  • They do not change very often, but they can change.
  • Breaking it down into 50×50 or 100×100 sections is very doable however it is possible that someone could run from one end of the map to the other so I need to be able to deal with the whole thing at some point, even if it is in sections.
  • This will obviously create a big memory drain.

I can store the data (shared vars) as simple byteArray or even in plainText. The information per hex is very simple, it’s just how many there are. I don’t “have” to save the data. (would be a feature)

The basic structure per hexagon is:

  • hex color (with outline obviously)
    (or a bitmap picture) blitting
    anyone!
  • TextField with a number in it. (max 2
    digits)

That is pretty much all the info that is needed.

If there wasn’t the possibility of the hex changing at all this would be fairly trivial.

So I am curious if anyone has any ideas on this. (any absolute truths wouldn’t be bad 😉

Edit: Oh the information on the hexes comes over a tcp stream. This isn’t an issue, like I said the data is simplistic per hex and my parser is lightning fast so it isn’t an issue.

Update: The possibility of having to create and maintain 250,000 objects (hexes) is what has me mostly asking this question. This is why I am looking for ideas. (250k objects in flash is well laf)

  • 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-05-21T00:34:29+00:00Added an answer on May 21, 2026 at 12:34 am

    The basic structure per hexagon is:

    * hex color (with outline obviously) (or a bitmap picture) blitting anyone!
    * TextField with a number in it. (max 2 digits)
    

    I suppose you don’t need to store all 250K TextFields and bitmaps, since they’re need to exist only on screen. Pack this data into small number of bytes – max 2 digits is 7 bits, add color id’s from your palette (or 24 bits if you need truecolor) and bitmap id’s. If you make structures of same size, you can write them into ByteArray. This will let you get rid of 250K object references and prevents possible memory fragmentation.
    Then you only need to create pack/unpack functions for those bytes into some usable objects (don’t forget object pools) and do the arythmetics to get them from ByteArray right. As others noted, 250K cells aren’t much if you pack cell data into pair of int’s.

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

Sidebar

Related Questions

I have been developing in ASP.NET MVC for a short while. Up to this
I have been trying to get this to work. Basically I have a search
i have been doing simple MVC tutorials for a while and i get the
We have been using CruiseControl for quite a while with NUnit and NAnt. For
I have been working on a web services related project for about the last
Have been programming with VS studio 2005/2008 making ASP.NET applications for a while. I
Have been struggling with Javascript closure for a while trying to wrap brain around
Have been searching for this, I need to have a conditional statement in my
Have been using it for a while with CodeIgniter and I can't remember if
I have been trying to register 3 hotkeys. I followed this example (or this

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.