• Advertisement
Sign in to follow this  

World Map Render And Storage

This topic is 1673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello to everyone!

 

I've got a problem. In my game I have the skeleton of world map (map is random) with description for every cell - water, seaside, forest and etc.

The map is not small - about 50 000 cells. And I need to draw, for example, the large region of map. For example 5 000 cells.

 

Can you help me to solve this problem?

Is there any way to do it good?

 

Here some of my solutions:

 

  1. Pre-render the region of map and render additional regions, when player visit new location on map
  2. Render each cell every frame smile.png
  3. ????

Thanks in advance,

Denis

Share this post


Link to post
Share on other sites
Advertisement

What exactly is the problem?

 

I'm assuming you don't want to go over all 50.000 cells and draw them, but only draw those that are actually visible. If that is the case, a Quadtree (http://en.wikipedia.org/wiki/Quadtree) might be a solution.

 

Should I Draw 5 000 cells of one region every frame? It will be slow...

Share this post


Link to post
Share on other sites


Should I Draw 5 000 cells of one region every frame? It will be slow...

Are you sure?  Have you actually tried it?

 

For beginners usually the best thing is to actually DO SOMETHING.  Do it first, then see what happens.  If you do it and the results are too slow, find a way to do less.  You might also be pleasantly surprised at how much a modern processor is capable of doing.  Nobody knows if your method is good enough until you actually try it.

Share this post


Link to post
Share on other sites


Should I Draw 5 000 cells of one region every frame? It will be slow...
If doing 5k draw calls sure it will be (but it might still be viable for fast processors). If drawing them in a single blow, it'll get you 100+ fps with ease. Just make sure drawcalls are kept to a low count. Replicating cell geometry and pre-transformation will be key. You might eventually look in instancing but I personally wouldn't use it for that specific usage.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement