DMap Info [Question]

08/07/2009 07:41 CptSky#1
I have a DMap Reader on my source. I want to check the access of some locations when a player drop an item, jump, walk, etc... But, if I load the DMap in an array, I have like 20mo of RAM used by one map. An other solution is to read the DMap when the player have to check the location but I don't want to kill my computer:rolleyes: The best solution, I think, is to load in memory the most used map like TC and for the other, check when the player use the map.

What is the best solution?
08/07/2009 08:57 tribalost#2
load only the needed maps
08/07/2009 13:14 tanelipe#3
Find a way to 'compress' the dmap data, I'm not sure whether it has been posted here but I've seen bone-you posting a method to compress the data in dmap; You could always ask InfamousNoone or unknownone, I'm sure that they know alot more about this than I do.
08/08/2009 00:01 _tao4229_#4
If you're only loading the valid coordinate info for EVERY map it should take about 40-50mb(estimation here, but 20mb for one map isn't right) (depending on how old the client is). If your server has the memory, load it into memory. Inlining DMaps and checking them every time a player or mob moves, drops, etc. would be ridiculous. You can compress them when stored (to a solid disk), but if you have to uncompress the memory every time you need to check it, it might start to use a lot of CPU (depending on how much it's compressed/the compression algorithm)
08/08/2009 09:41 CptSky#5
Quote:
Originally Posted by _tao4229_ View Post
If you're only loading the valid coordinate info for EVERY map it should take about 40-50mb(estimation here, but 20mb for one map isn't right) (depending on how old the client is). If your server has the memory, load it into memory. Inlining DMaps and checking them every time a player or mob moves, drops, etc. would be ridiculous. You can compress them when stored (to a solid disk), but if you have to uncompress the memory every time you need to check it, it might start to use a lot of CPU (depending on how much it's compressed/the compression algorithm)
I use the client 1017, I think it's the client 4311 US. I load the access, the terrain, the altitute and the portals in an array. I load the DMap in memory and with the program named iBruteforce Memory Optimizer, I reduce the memory.

I have calculated the used memory whitout compression of some maps:
Code:
TC -> 18mb
PC -> 19mb
AM -> 18mb
DC -> 18mb
BI -> 21mb
MC -> 20mb
GW -> 03mb
When I load all the maps, I have like 120mb of memory used by the maps.

I obtained the code of the program which I used and I have adapted it to the C# and I put it in my source. With the loading, with the 7 maps, instead of obtaining 120mb, I obtain approximately 3mb. I do not see any algorithm of compression…


#merged
08/08/2009 12:59 damianpesta#6
Quote:
Originally Posted by CptSky View Post
I use the client 1017, I think it's the client 4311 US. I load the access, the terrain, the altitute and the portals in an array. I load the DMap in memory and with the program named iBruteforce Memory Optimizer, I reduce the memory.

I have calculated the used memory whitout compression of some maps:
Code:
TC -> 18mb
PC -> 19mb
AM -> 18mb
DC -> 18mb
BI -> 21mb
MC -> 20mb
GW -> 03mb
When I load all the maps, I have like 120mb of memory used by the maps.
I did not notice big changes in memory usage after I implemented DMaps , And I've been loading , like 20 maps or more... The only time I noticed increase in cpu usage was when the server was starting.Then somehow it went down again.
08/08/2009 17:44 _tao4229_#7
Quote:
Originally Posted by CptSky View Post
I use the client 1017, I think it's the client 4311 US. I load the access, the terrain, the altitute and the portals in an array. I load the DMap in memory and with the program named iBruteforce Memory Optimizer, I reduce the memory.

I have calculated the used memory whitout compression of some maps:
Code:
TC -> 18mb
PC -> 19mb
AM -> 18mb
DC -> 18mb
BI -> 21mb
MC -> 20mb
GW -> 03mb
When I load all the maps, I have like 120mb of memory used by the maps.

I obtained the code of the program which I used and I have adapted it to the C# and I put it in my source. With the loading, with the 7 maps, instead of obtaining 120mb, I obtain approximately 3mb. I do not see any algorithm of compression…


#merged
You don't really need the altitudes unless you plan on checking them. You really only need the height in guild war, not even TQ server side checks gate jumping anywhere else. Portal info doesn't even have where the portal leads to (if I'm not mistaken), so that's not really useful server sided. What you only need is the valid coordinate part of the DMap, and even that's not entirely useful if you can't check the individual scene files as well. Getting rid of the altitude and portals in memory should drop it way down considering all you'll have is a bool[x,y] for the maps. But hell, if you plan on checking all of it you'll probably want to just load the main maps (TC, BI, AC, GW, PK Arena), then whenever someone enters a map load it into memory to be checked (yes I realize that would slow down a teleport if noones been there yet, but it's either that or only load core maps and deny access everywhere else).
08/08/2009 18:13 CoAttack#8
how much in Mem Usage of task manager is 108,000K? , is that 1mb?
08/08/2009 18:14 _tao4229_#9
thats ~108mb.
It's 108 thousand kb = ~108mb
08/08/2009 18:14 CoAttack#10
:O then when i load all the dmaps its 108mb :O is that bad?
08/08/2009 18:24 Kiyono#11
Quote:
Originally Posted by CoAttack View Post
:O then when i load all the dmaps its 108mb :O is that bad?
I guess it is.
08/08/2009 20:25 CptSky#12
Quote:
Originally Posted by _tao4229_ View Post
You don't really need the altitudes unless you plan on checking them. You really only need the height in guild war, not even TQ server side checks gate jumping anywhere else. Portal info doesn't even have where the portal leads to (if I'm not mistaken), so that's not really useful server sided. What you only need is the valid coordinate part of the DMap, and even that's not entirely useful if you can't check the individual scene files as well. Getting rid of the altitude and portals in memory should drop it way down considering all you'll have is a bool[x,y] for the maps. But hell, if you plan on checking all of it you'll probably want to just load the main maps (TC, BI, AC, GW, PK Arena), then whenever someone enters a map load it into memory to be checked (yes I realize that would slow down a teleport if noones been there yet, but it's either that or only load core maps and deny access everywhere else).
The only thing I don't use, it's the terrain. The correct coord, you know why, the altitude, I check in the GW map for trying to block the WallJump. The portal don't use a lot of memory... With a lot of them, I don't get more then 500ko if I load all the portal on a big map like TC. But I will considerate your point for removed a little bit of memory without compression or anything.
08/08/2009 21:57 CoAttack#13
how do you make it check for coordinates and stuff?