Page 1 of 1

Gridmap structure and performance

Posted: Tue Oct 20, 2009 10:27 pm
by RolsenRoyce
So, I was thinking about having a really really huge map in my project.
I have been playing various browser games that had certain times of the day when the gridmap loading chokes.
So I want to avoid this the best way possible.
Maybe they had bad hardware, I do not know, but here I have some ideas for a gridmap structure, but I do not know how they perform.

Legend: DB1-1=Database,number-grid number.
Illustrations are sized to ridiciously low

Clustered map:
Several databases, containing map regions
DB1-1.DB1-2.DB1-3.DB2-1.DB2-2.DB2-3.DB3-1.DB3-2...
DB1-4.DB1-5-DB1-6.DB2-4.DB2-5.DB2-6.DB3-1...
DB1-7.DB1-8.DB1.9.DB2-7.DB2-8....
DB4-1.DB4-2...

Striped map:
Map sliced into lines
DB1-1.DB1-2.DB1-3.DB1-4.DB1-5.DB1-6.DB1-7.DB1-8...
DB2-1.DB2-2.DB2-3.DB2-4.DB2-5...
DB3-1.DB3.2.DB3-3...

Somehow, I feel that a striped map performs better than a clustered one.
Every game I've played had problems to load clustered maps DB1-1-9 during heavy loads, very boring to watch indeed.
I have not seen a striped setup.

Purpose of this map is to contain a lot of values (height, type, buffs, resources etc.)
Map loading is done in two phases; the terrain itself, then whatever players, vehicles, buildings by ID, wich in turn will be put in other databases.

Anyone care to chat about this matter?
So far, I will go with striped setup.

Re: Gridmap structure and performance

Posted: Tue Oct 20, 2009 10:59 pm
by hallsofvallhalla
check out my game
http://forsakensanctum.com/tutorial/login.php

it uses a grid map structure that can be huge yet light on the database. I writing a tutorial on how to make this. I have the code posted somewhere here .

Re: Gridmap structure and performance

Posted: Wed Oct 21, 2009 1:21 am
by RolsenRoyce
Excellent, will be looking forward to that.

Re: Gridmap structure and performance

Posted: Fri Nov 27, 2009 3:14 am
by ZeroComp
yes I am having trouble getting the gridmap for faction wars to work so I too will be looking forward for this one.