mob
verb
Make_Map()
MakeDungeon()
Problem description: Forget those Lag testing hubs, this is the real deal - It practicily DESTORYS Dream Seeker, while the same thing is a breeze for the actual file it came from.
ID:145455
![]() Mar 17 2006, 1:17 pm
|
|
Code: Map generator, using Jp's MakeDundgen() proc in his.
mob Problem description: Forget those Lag testing hubs, this is the real deal - It practicily DESTORYS Dream Seeker, while the same thing is a breeze for the actual file it came from. |
I did that before (Apart from I put the whole code into a new file) but it didn't work. Testing again...
I bet a lot more are, but they claim it as their own. <_< EDIT - Still a murderer. mob It was adjusted to fit in with my game size. |
I bet a lot more are, but they claim it as their own. <_< Eh. I know I wrote it. :P. EDIT - Still a murderer. Hmmm... Strange. Those arguments should work. Is the area you're mapping all /turf/wall? I can't see any reason why it would lag to all hell if it wasn't, but still... |
Well, heres the Turf tree...
turf They DID have caps to start, but I got rid of them for it. Oh, and Loop check is off. Its very annoying when you don't want it. |
I meant, is the area you're mapping onto all '/turf/wall'?
Also, you've said that you copied the code over. Does that mean you grabbed the code from the library, and copy/pasted it in? In that case, make sure you got ALL the procs there. Specifically, the ones you need are: -GenRect() -IsValidRect() -MakeDungeon()(duh) Also, it could be something to do with the verb name, though I doubt it. Try renaming it, just in case it is interacting with the MakeMap() proc in an interesting fashion. |
Alright. This is getting weird.
I'm going to ask if you could do some serious debugging. Could you replace the 'MakeDungeon()' proc you copied with this one, and then run it, outlining the results? proc/MakeDungeon(var/x,var/y,var/z,var/floortype,var/walltype,var/iterations,var/rminx,var/rmaxx,var/rminy,var/rmaxy,var/minx,var/maxx,var/miny,var/maxy,var/repeatlimit) I'm looking for the output. It should help me figure out where the problem is. |
Wow.. it works now. ish.
posswalls.len = 0 MakeDungeon(200,200,1,/turf/floor,/turf/wall,12,1,8,1,8,1,world.maxx,1,world.maxy,0) |
Does the GenRect() proc you have look EXACTLY like this one?
proc/GenRect(var/x1,var/y1,var/x2,var/y2,var/z,var/floortype,var/walltype,var/list/posswalls) My thoughts are that you may have downloaded an earlier version of the library, and because you copied it over instead of using the include function, it didn't get updated. Possibly there were bugs. |
Strange. Could you try this in place of your GenRect() proc?
proc/GenRect(var/x1,var/y1,var/x2,var/y2,var/z,var/floortype,var/walltype,var/list/posswalls) And are you ABSOLUTELY SURE that you're mapping over an area composed ENTIRELY of whatever walltype is? Because if you aren't, it won't work. |
The problem is the lack of arguments, I believe. Let me just pull up the source file for the library...
Yeah, it's the lack of arguments. Just to copy the commented-out help file inside the library, which should probably go in some sort of web-page:
Of course, making large maps will make it slow down, but not too much. The longest wait I've seen was about 10 seconds or so, and that was a pretty big map.
I should add some ASSERT()s to that proc...
EDIT: And as an example, this is the actual code for the demo map-drawing procedure: