am i doing this right? storing roomdescription as name

All and any discussion and development of the Mudlet Mapper.
kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

am i doing this right? storing roomdescription as name

Post by kakku »

so i got the mapper somewhat working on WoTMUD.
i'm grabbing the room's name and description , add them together like this:
The Village Herbalist's Cottage @ The former village wisdom
lives in this house, tending the people of hervillage. Glancing around, you can see the many herbs
and materials of herold trade drying on racks. To the east, the sounds and sights of the mainstreet
filter in, and a small staircase leads up to the wisdom's sleepingchamber. The village green is to
the north. A small sign hangs by the door.
in this way i'm 99.9% sure every description is unique.

and pass that to setRoomName( roomID, roomName)

is that gonna be too heavy ? or will it be alright?

ps. WoTMUD has something like 1.000.000 rooms maximum (really big guess..)

EDIT: new estimate: maximum 20.000 rooms. still wondering if i should continue like this or if i'm gonna get major lag problems later because of too big map filesize ?
Last edited by kakku on Thu Mar 10, 2011 9:16 pm, edited 1 time in total.

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: am i doing this right? storing roomdescription as name

Post by kakku »

i mapped now about 5200 rooms and i start to feel the lag. :(

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: am i doing this right? storing roomdescription as name

Post by Heiko »

What's the map in WotMud like? Is it a LPC type grid map? If so the lag will be gone completely with the next update (1000x1000 grid is rendered in less than a millisecond on my machine).

If it's a non-grid based map you need to start dividing your map into different areas e.g. each city becomes an individual area, each village, dungeon etc.. The lower the room number per area, the faster the mapper.

Having the room description as room name shouldn't have any negative effect if you have a decent amount of RAM in your machine. For the time being this solution is alright. I'm going to add some Hash function that will allow you to create a hash code for your room description and use it with the respective romm ID by hash functions in the mapper. This uses less memory and saves the room name for something more useful such as user defined room names for bookmarks, for room search etc. For example, in my mapper script for Avalon (This is an LP MUD and thus doesn't have room names) the user can set bookmarks and store information about the room in the room name such as:
name of important objects, NPCs, shrines, shops etc. The user can then search for all grocery stores etc.. This is very convenient.

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: am i doing this right? storing roomdescription as name

Post by kakku »

WoTMUD is a circlemud. so no LPC endless grids. it only uses n,e,s,w,u,d andin the 5200rooms i mapped i only encountered 3 duplicated room descriptions.. pretty unique stuff alright.

so far i mapped all rooms into one area.. so that could be it.
or maybe its cause i was mapping and then it has to searchRoom(roomdesc) a lot.
when i run around the map now, using the getIDfromExits from the lastroom visited, its smoother already.
or maybe it was just laggy on the mud. or on my connection..

looking forward to the new stuff :)

if i would make more use of area's as you suggest, i take it you advice me to make use of the getAreaRooms(area id) function and such ?

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: am i doing this right? storing roomdescription as name

Post by kakku »

having reached 10500 rooms mudlet crashed. making new rooms has been very laggy for me the last couple 1000's rooms. the spinning rainbow circle appears when i spam into more than one room. all this on a 8gb RAM Mac..
but then again i didn't implemented areas yet. mainly cause i want to see all bordering areas at all time. and also cause i think (stubbornly) that it wouldn't change anything to making new rooms. it would still have to check if the new room's description already exists. the funny thing is that this lag also stalls the appearance of the new room; it pauses the mud output..

gonna try and be patient and wait for that new Hash function thing. just thought i should report.

User avatar
Vadi
Posts: 4901
Joined: Sat Mar 14, 2009 3:13 pm

Re: am i doing this right? storing roomdescription as name

Post by Vadi »

Heh. I think Mudlet should just allow multiple areas to be shown at once instead. Good to know the upper limit right now though, on the unoptimized creation so far :D

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: am i doing this right? storing roomdescription as name

Post by Heiko »

Mudlet currently draws the entire area (in your case 10500 rooms) every time you move or add a new room. Divide your map into areas (cities, dungeons, islands etc.) and your performance problems will disappear.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: am i doing this right? storing roomdescription as name

Post by Heiko »

Vadi wrote:Heh. I think Mudlet should just allow multiple areas to be shown at once instead. Good to know the upper limit right now though, on the unoptimized creation so far :D
This doesn't really make sense in most MUDs because it's usually impossible to logically layout several areas at once because the map designers just created their area as an individual island that has mostly zero spatial relationshipt with the bordering areas let alone the rest of the map e.g. a dungeon must be layouted as a single room with a single exit in the city area where the dungeon is located but it consists of 5000 rooms with a bunch of exits to different parts of the city. This is a typical scenario that is impossible to visually render in an aethetically pleasing and easily comprehensible way as you'd get tons of crossings and the spacing would be so large that the city area map would be impossible to use.

The area concept can be found everywhere throughout all MUDs that I know. Usually the rooms per area size is so small that writing render optimizations doesn't make any sense because rendering all rooms at once is super fast anyways.

The obvious exception are grid maps (100.000-1.000.000+ rooms per area laid out as a exit length = 1, 8 exits per room grid). Grid maps get treated differently in Mudlet and are rendered in less than 1 millisecond on my machine.

User avatar
Vadi
Posts: 4901
Joined: Sat Mar 14, 2009 3:13 pm

Re: am i doing this right? storing roomdescription as name

Post by Vadi »

It does make sense, and it's very convenient to pass through area to area with you seeing where you're going. It'd be nice if the map was able to draw only what it needs, like the mudbot one does - then this is no problem.

kakku
Posts: 42
Joined: Tue Feb 22, 2011 12:03 pm

Re: am i doing this right? storing roomdescription as name

Post by kakku »

Vadi wrote:It does make sense, and it's very convenient to pass through area to area with you seeing where you're going. It'd be nice if the map was able to draw only what it needs, like the mudbot one does - then this is no problem.

i was just gonna say that. :)
why not only draw rooms that are closeby?

and then make it an option to hide those dungeons areas that are huge and don't fit in really.

Post Reply