Page 1 of 1
Size of .WLD-file - does it matter?
Posted: Mon May 29, 2006 12:11 pm
by Guest
I have noticed a lot of times when my game crashes, it does so when my .WLD file exceeds about 205 kb. Now I have kept it at about 202 kb for a while, deleting old objects when I add new ones just in case to avoid a crash. But I want to expand my city much more and the game runs smooth and without lag so the engine does handle the objects just fine.
As far as I know, I have never been able to play a map with a WLD-file containing over 207 kb. Now I wonder if anyone have any ideas on this, similar or completely different experiences? Have you managed to use a larger WLD file?
Looking at the shipped BF2 maps, the biggest WLD file is found in Endor which is at 190 kb.Perhaps there is a setting in the LUA scripts that controls the memory size of the added objects?
In the script LUA (end1g_con.lua) of Endor:
SetPS2ModelMemory(2460000)
Is this used for PlayStation2 only? Anyone knows exactly what it does?
It does seem to look like it allocates memory space for models.
SetMemoryPoolSize("Obstacle", 745)
I wonder if this is also connected to the issue?
RE: Size of .WLD-file - does it matter?
Posted: Mon May 29, 2006 1:54 pm
by Big_rich
well, I know anything with xbox or PS2 is specific only to those platforms. You can try to remove the PS2 from modelmemory munge and run it through bf2modtools.exe to see if that cause an error, in which case you know it doesn't work for PC.
Posted: Mon May 29, 2006 3:48 pm
by Guest
Here are my latest findings:
A .WLD file of 100 objects has a size of about 27 kb.
That means every kb equals about 3,7 objects or so.
I just added 15 objects to my 205 kb file and it would crash.
Then I removed those 15 objects and it would run again.
(I used a low-poly count object that I created myself, with about 30-40 polys each)
Now, the file that crashed was at about 208 kb.
205 kb (*3,7) = about 758,5 objects = secure map load
208 kb (*3,7) = about 769,6 objects = crashes (freezes) at loading the map
Allright, these figures are estimates and I believe that I only saw windows rounded kb size so they should be somewhere around these amounts.
I am sure there are ways to alter the maximum amounts of objects that the game can handle, I am just not sure HOW yet.
Regarding these kb sizes, I am fairly confident at this point that the game crashes at somewhere over 205 kb of the .WLD size.
Though, if anyone has different results, please let me know!
Now, I could try removing let's say 10 or 20 low-poly objects and replacing them with an equal amount of high-poly objects to see if that has any effect. Then the issue is not about the amount of objects, but the amount of total polys..
Any ideas regarding this would be most welcome!
Posted: Mon May 29, 2006 4:57 pm
by xwingguy
I've had a similiar problem with my own map except I've found that the problem is not quanity of objects but rather what those objects are. Certain groupings of different objects cause a crash while others do not.
Posted: Tue May 30, 2006 11:12 am
by Guest
Thanks for your ideas, xwingguy.
That sounds like what I used to believe, but I am starting to doubt it more and more. I would hope that you are right though, because I am getting tired at never being able to exceed a certain amount of objects in my maps. It might also be related to the total number of polys in the objects, but that does not explain why my maps always crash when I add those random few objects to a 205 kb wld-file.
I would though need more replies to get a clear overview.
What kb size are your largest WLD-files at?
IF it turns out that the number of objects is somehow limited, this drastically changes the planning of any large map. I may have to merge several objects together in that case and also leave out the ones that are not totally essential to the map.
In any case, regardless if I am right or wrong on this, at least I have now posted my own experiences about it. So if your game crashes mysteriously at a WLD-file of 206+ kb at least you were forewarned.
Posted: Tue May 30, 2006 12:08 pm
by Lord-Bandu
Thats a massive .WLD ! lol
My Galactic Senate Lagtest weighs in at 66kb and it has over 270 pods weighing in at about 100 polys per pod.
Have you tested the working map on Multiplayer? My senate map doesnt work on MP , it just freezes on the loading screen.....it works fine in SP.
I very much doubt that the number of objects would make it crash ...... either its a poly limit ( whether that being an engine thing or a computer - computer thing) or 1 of your new objects is corrupt. I have had a couple of problems with corrupt custom models when i 1st started modelling. Everything would work fine until i added a certain model and it would crash the map.
Posted: Tue May 30, 2006 12:28 pm
by Jawa_Killer
no a poly limit isn't it.........we have placed an object with 14000 polys and it still works without any lagg^^ even in MP
Posted: Tue May 30, 2006 12:34 pm
by Lord-Bandu
14000 isnt alot tho' .
The fact is , my Senate lagtest map works fine in SP , it crashes upon loading in MP . I lower the amount of polys considerabley (take out lots of pods) and it works for MP .
Posted: Tue May 30, 2006 12:36 pm
by Jawa_Killer
ah ok.........maybe you have limit in the lua? dunno

Posted: Tue May 30, 2006 1:03 pm
by Teancum
There's only so much memory allocated to models as far as I know. I'm pretty sure that applies to only static world models (not a vehicle, weapon or unit)
Posted: Tue May 30, 2006 5:00 pm
by xwingguy
Teancum, you hit the nail on the head.
Posted: Wed Jun 14, 2006 6:45 pm
by xwingguy
Whoa, Elerion, I just totaled your theory. My GCW-ships layer reached 209 KB and I can still run it.