Sign in to follow this  
Barrett

World Map Render And Storage

Recommended Posts

Barrett    174

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
Barrett    174

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
frob    44904


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
Krohm    5030


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this