Mudlet-1.2.0-pre6 released

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Mudlet-1.2.0-pre6 released

Post by Caled »

I'm trying to find where the various mapping functions are so I can look at them and work out what they are and how to use them. I can't seem to find much though, could someone please point me toward the right file?

Right now I'm trying to figure out the syntax in createMapper() but I'm sure there will be others I want to look at so it would be best if I can look at the functions themselves - otherwise I'll end up bombarding you with silly questions about every second function.

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

Re: Mudlet-1.2.0-pre6 released

Post by Vadi »

I didn't document them yet - your best bet is to look in TLuaInterpreter.cpp atm

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Mudlet-1.2.0-pre6 released

Post by Caled »

Vadi wrote:I didn't document them yet - your best bet is to look in TLuaInterpreter.cpp atm
Yeah, that is the file name I was looking for, thanks.
Trying to work out what createMapper() creates and how I can temporarily change the background colour to make the resizing easier. At the moment using something bastardised from Heiko's demo Achaean thingy it is too far toward the center of my screen space. I want to push it right but can't see the boundaries of the object, which seems to be something like a mini console. I'm also not sure what all of the parameters are for. I think it is
createMapper( x, y, width, height)
but I am not certain.

Looking at the createMapper function's code directly should let me figure both out.


Edit: if anyone is interested, it is indeed (x, y, width, height), and looking at it, I suspect it IS possible to change the background to the inline map console, but I can't figure out what name it can be referred to as.
Code: [show] | [select all] lua
 Host * pHost = TLuaInterpreter::luaInterpreterMap[L];
    pHost->mpConsole->createMapper( x, y, width, height );
    return 0;

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

Re: Mudlet-1.2.0-pre6 released

Post by Heiko »

The only chance to get to grips with the mapper api at this point is to look at the autowalker packages (especially the Lusternia one) and at the aardwolf_mapper_demo.xml that I've posted in the other thread. Both scripts together will show most functions in use. The createMapper() + the function that gets you the exact size of the main console are being used in the Achaea autowalker demo that I've added to the original mapper preview thread. In this demo the mapper uses as much space as available.

About the 3D view: Yes, I've tested on Aetolia - especially Bloodloch - in order to try to make the 3D view useful in hugely complex cities that consist of many different levels. In general, I've found that not using transparency in complex cities makes things a lot easier, however, in less complex places (=95% of all areas) the current view with transparent layers above your current level are better. I'm going to make transparency a scriptable user option as well as the level colors. The enironment colors are already fully customizeable.

In any case, what I'm working on at the moment is to improve the 2D view as I think that that's the view that most people will use most of the time. In my view the 3D view is very nice to get a better idea of what the area looks like and it helps greatly to orientate yourself, but the 2D view is what I'd use most of the time. However, this really depends on your personal preferences. There are people who definitely use the 3D view exclusively. The mapper is able to remember view angle and zoom for each room.

The next thing I'll add:

- up/down/in/out exit markers to the 2D view plus a button that gets you to the 2D view directly. Currently you have to get down to 1 level display depth + top view.

- special exits like "enter portal" etc. and enable the use of one direction only exits in pathfinding.

- direct access to an SQL database to easily store information like room description, notes, denizens, items that you can get there etc.. I can't store this kind of information in RAM as it takes too much memory on large maps. IRE MUDs have comparatively small maps because they are node based and not grid based. Grid based maps tend to get huge.

More suggestions are welcome.

ixokai
Posts: 63
Joined: Fri Dec 25, 2009 7:43 am

Re: Mudlet-1.2.0-pre6 released

Post by ixokai »

I've uploaded pre7 for the mac to http://ixokai.io/get/Mudlet-mac-1.2.0-pre7.zip (latest always at http://ixokai.io/get/Mudlet-mac-LATEST.zip)

This version contains uh, some functions to map non-IRE/GMNP/MMP muds. Or something. Heiko will have to elaborate, I'm just his personal build slave :)

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Mudlet-1.2.0-pre6 released

Post by Caled »

The new pre7 seems to have broken the createMapper() way of displaying the map inline. It continues to show the jumbled images even after deleting all map files and prompting a redownload of the map.

The map displays correctly in the default docked pane though.

Tested only in osx.

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Mudlet-1.2.0-pre6 released

Post by Caled »

I have more information on the above bug.
When I disable the script that runs createMapper(), and restart mudlet in that profile, even the docked mapper displays jumbled images.

First test:
I deleted the contents of: mudlet>Profiles>Aetolia>Map
and: map.xml
It did not fix the problem. After downloading a new map, the jumbled images are still displaying.

Second test:
I deleted the entire mudlet folder. All profiles, everything.
Problem fixed.

Third test:
While gradually putting my system back together, I discovered the cause: as soon as I enable GMCP, upon restarting mudlet the mapper will not display correctly, whether docked or inline.

Fourth test:
I will later try in windows. I'll get back to you with the result.

Edit: just to be clear, this is pre7 in OSX.

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

Re: Mudlet-1.2.0-pre6 released

Post by Heiko »

If you are using GMCP you need to call the function centerview( roomID) if you've moved to a new room. This will update the map and center it on roomID. Usually you'll want to do this in your gmcp event handler when the new room data has arrived.

For more information and examples of some of the new mapper api check out my aardwolf_mapper_demo script in the "mapper now works for non IRE MUDs" thread.

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

Re: Mudlet-1.2.0-pre6 released

Post by Vadi »

Pretty sure latest xml here accounts for gmcp: http://drop.io/mudlet_mapper by calling centerview on new room id's.

Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

Re: Mudlet-1.2.0-pre6 released

Post by Caled »

Vadi wrote:Pretty sure latest xml here accounts for gmcp: http://drop.io/mudlet_mapper by calling centerview on new room id's.
Thanks heaps! It does indeed solve the problem, and supply a bunch of features that I hadn't had the chance to notice were missing yet, because I hadn't yet seen that link. I thought the mapper preview thread wasn't in use anymore :oops: and figured I had to write that stuff myself.

Post Reply