ID:943894
 
No code issues at the moment but I am wondering about map size. I created a main map that is 160x160 to generate a fairly large area on one level for the player to explore. It is looking good and compiles nicely but when I try to load it in RUN it takes forever to come up on screen. Is there a limit on map size or do I have something else set wrong?

It's probably a loop in your code, that's running a lot more than needed. Could you show us what you have in world/New()?
160x160 isn't that big. How big is your view?
In response to Albro1
View is 8

Not running a New(). Dont see anything that could be looping except I did upoad an elevation library but I placed the code in a new fle and unchecked the library.
Well, what kind of things are happening on world start-up?
Its just the map and one character. I have the elevation proc active because I have to use elevation = instead of density = but other than that nothing. The only start up actions are display the map and place the mob. I have a stat panel on as well, health, strength and all that. I had the same set up on my previous map before I cahnged everythin to this one and had no problems.
If it's simple enough, can you ZIP up the project and link it here?
In response to Stephen001
I sent the file to you in a Page Message

OK, I extracted just the part of the elevaton code that I actually need from the library. The rest deals with operations I will not be using. The rest of the original library is in a seperate file and not active but every time I try to use any part of it I get like a 5 min lag on loading RUN TIME. Here is the part that I am using. The original is written for mobs to slide and fall and uses turfs as the elevation base. My verson here is written only to consider a mob walking behind something or under something and obj's are used instead of turfs, although it can go either way. It works beautifully except for the major lag on loading RUN TIME which does not occur when I deactivte all parts of the elevation code.

atom
var
elevation = 0
turf/last_turf
list/entry_dir = list()


atom
Enter(atom/A)
//checks to make sure the expected lower and upper bounds of elevation aren't exceeded
if(src.elevation < 0) src.elevation = 0
if(src.elevation > 100) src.elevation = 100
if(A.elevation < 0) A.elevation = 0
if(A.elevation > 100) A.elevation = 100


//elevation of 0 presents a special case where the atom is always enterable
if(src.elevation == 0)
return TRUE
//elevation of 100 is the highest possible elevation therefore entry will always be denied
if(src.elevation == 100)
return FALSE



obj/wenhirtreesPT3behind
icon = 'wenhirtreesPT3behind.dmi' // -- density = 0 by default, so you can move through it

//!but, since a mob can move through it, we hafta be careful here. The tree is supposedly
// in front of the player, so -> if a player moves through it we'll hafta make it look like
// they're moving _BEHIND_ it. We can do this by drawing the tree on the normal level (actually on obj level)
// and having a second tree drawn on a layer above the mobs. Then the map will automatically
// draw the mobs in between the two and the mobs will look like they're moveing behind the
// tree to the player.

icon_state = "wenhirtreesPT3behind" //this will be the tree drawn on the obj layer with mobs
New()
//this is a procedure ('proc') DM uses to initialize any new atom (or datum)
// it's called by the system whenever something is created, so we'll use it to
// set up the arch pic
.=..() //this line makes sure everything else about this obj
// is set up correctly
var/image/wenhirtreesPT3behindImage = new/image( 'wenhirtreesPT3behind.dmi' ) //create a new image from the tree icon
wenhirtreesPT3behindImage.icon_state = "wenhirtreesPT3behind" //grab the tree 'frame' from the icon file
wenhirtreesPT3behindImage.layer = MOB_LAYER + 1 //here we'll make the arch layer one ABOVE the mobs
wenhirtreesPT3behindImage.pixel_y += 6 //we'll move it up/north just a bit so it fits in with the rest
src.overlays += wenhirtreesPT3behindImage //then we'll add the new image to the obj's (src)
// overlays list (which is like a list that holds
// extra pictures you can put OVER your icons
Who's library is this extracted from?
yours
var/image/wenhirtreesPT3behindImage = new/image( 'wenhirtreesPT3behind.dmi' )


Do you have or create a lot of wenhirtreesPT3behind objects on your map at start-up?
Well seen as the library is very basic, it doesn't cause lag(I have tested it quite a lot) so I would assume the start up lag is to do with creating a large amount of the images Stephen mentioned.
They are part of the scenery and I need the player to be able to move behind them on certain paths. Is there a way to do this only when needed cause the long load only happens when I use this code. I have two versions of this tree, one is a standard static obj while the ones that stick into paths are created sepearetly.

Also, the library caused the same problems before I ever altered it. Not saying there is something wrong with it, just trying to figure out what is arong in my code so I can fix it.
Make a tree in 2 parts the bottom part having a lower layer(and probably being dense) and the top part having a higher layer. I would say that might solve the problem.

On a side note it doesn't seem like you have actually applied that part of the library anywhere, what does it actually do?
Found the part messing it up. Took it out and everything loads just fine.

    turf/last_turf
list/entry_dir = list()