Ok so wasnt exactly sure where to put this but this will do hopefully.
Im wondering if it makes a difference in loading/running on how you put your map together. What I mean by that is if you piece it together with different Z levels or just have one big Z level.
So say have 250x250x4 that are linked together to look the same as 500x500x1. I wouldnt think there would be a difference but before I make a decision on how to make my map curious on this
ID:151512
Jul 18 2010, 4:35 pm
|
|
when editing in the map editor, the larger the map the longer it will take your processor to access the current Z level. So let's say you're editing a 1000,1000 map ( just assuming). It will take significantly longer to work on that map (and manage it) than it will on a map that's 250x250x4. Besides, compartmentalization is the hidden key to accessibility, that's how windows works anyways. The better arranged things are, the more likely you'll find it fast.
| |
Another thing I noticed, is that when you have a larger map in the early stages of compiling, the longer the compiler will take to do it's job.
For example, let's say I have 10 maps, and I decided to just number them 1-10. The compiler would read them as follows: 1 10 2 3 4 5 6 7 8 9 Now, let's assign some sizes to them in brackets. 1 (25x45) 10(45x55) 2 (90x40) 3 (45x60) 4 (1000x1000) 5 (45x40) 6 (10x10) 7 (15x60) 8 (75x75) 9 (20x45) When compiling this, it would read and compile maps 1, 10, 2, and 3 fast because they are small, and number 4 would take longer because of its size. You would think that 5-9 would compile fast because they are also small, but that is an incorrect assumption. All of the maps after map 4 would be considered to be 1000x1000 and take just as long to compile as map 4. The reason for this (so far as I can figure) is that the world.maxx, and world.maxy (unless set by you in the code) starts off as null, and matches the largest map it gets to while compiling. So, if you are going to use a large map, mixed with a bunch of smaller maps, I would use a different naming/numbering system such as the following. 0001 0002 0003 0004 0005 0006 0007 0008 0009 9999 This system is perfect if you don't know how many maps you intend on having in your project as you can make 9999 into your largest map, and have all references to it as either a tag or world.maxz, and you can add new maps at will without needing to change references and make compile times longer. Also, to organize, I put an actual map name in brackets so I know which map is which still. As far as which way would be best for you to implement, I would probably say to just use one large map to keep things simple. | |
Or you can save some time and space by putting multiple smaller maps in the empty space having a single 1000x1000 map creates on all of your maps at runtime. Having a ton of empty space around your smaller maps while the game is running is going to result in a resource hit anyways, because those small maps won't stay small.
| |
There are libraries/demos out there that will show you how to make AI switch off if no one is within a certain "area" so you could technically make each one of those seperate maps an additional area in which the AI turns off or whatever you got running in there if there are no players in there
So that will reduce server lag but it can also be done on the one big z level also. its all about how you want to run your game.