Browser mini window/console?

Post Reply
Splork
Posts: 11
Joined: Tue Nov 17, 2009 1:00 am

Browser mini window/console?

Post by Splork »

A couple of years ago I began working on a project for our customized version of Fmud. I created a bunch of area maps using Dundjinni and then I display part of the map inside a window/box. As the player moves, the map moves around him and the player appears to always be in the center of the box.
Image

We would like to port this feature to mudlet, so I have a few questions. We also have a dynamic world map which displays the position of everyone in-game, who is in the group, etc. Many of our players currently have this displayed inside their client( it helps them locate those whom have died ).
Url inside Window
Comes from this webpage:
Dynamic Map

Is there any way to display images from URLS inside windows?
Is there any way to adjust the position of images inside the windows?
Is there any way to display part of an image, so that not the entire image is shown at once, similar to the above example?

A couple of other clients have something similar to the below feature:

HtmlBrowse
format: #htmlbrowse {window title} {url}

Redirects an html window or popup to display the web page at the specified url.

example:

#htmlbrowse {sloth} {www.slothmud.org}

Directs the window named 'sloth' to display Sloth's home page.

Basically, we would send the data via ATCP. If the variable for atcp_area_vnum changed, we would request the new map. Place part of the map in the window, and adjust it according to the x and y coords of that room, which are also sent via ATCP.

Thanks for any advice!

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

Re: Browser mini window/console?

Post by Heiko »

I shipped a webkit browser module with early Mudlet versions, but this wasn't working properly on all supported platforms and thus got removed. Maybe Qt's webkit module is working better now, but it's still a feature that's not really necessary because you can use a native browser to display webpages -> API reference.

To display your map images you can use image labels and download the corresponding images or use transparent overlays to mark player positions etc.. There's plenty of possible solutions here using the current features.

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

Re: Browser mini window/console?

Post by Vadi »

Wyd made something similar for Achaea, actually. Achaea transmits URLs such as http://www.achaea.com/irex/maps/clientm ... =0&level=0 7 3 in it's atcp/gmcp, and one of the clients made use of that to display it.

Check it out http://forums.mudlet.org/viewtopic.php?f=6&t=1380, http://forums.mudlet.org/viewtopic.php?f=6&t=1356 for ideas. I don't think LuaSocket is necessary anymore - Mudlet now has downloadFile(), but you'll be able to get image positioning ideas off there.

Splork
Posts: 11
Joined: Tue Nov 17, 2009 1:00 am

Re: Browser mini window/console?

Post by Splork »

Thanks for the help, that is very close to what we would like to accomplish.

Their script requires luasocket to be installed. Does anyone know off hand where the files should be placed?

I have searched the forums in regards to luasocket and only found one mention of where to place the files:
this post but this placement does not seem to be working for me.

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

Re: Browser mini window/console?

Post by Vadi »

Using LuaSocket would require providing it for Windows, Mac and Linux, since it's a C library. Would be much better to replace it with built-in downloadFile().

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

Re: Browser mini window/console?

Post by Heiko »

The Lua socket library isn't included because security considerations for the general user.

Splork
Posts: 11
Joined: Tue Nov 17, 2009 1:00 am

Re: Browser mini window/console?

Post by Splork »

Understood, downloadFile works perfectly.

Appreciate the knowledge.

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Browser mini window/console?

Post by chris »

Webkit is sort of a pain to deal with as well. The module help system initially was webkit based but I dropped it since it was giving issues when compiling on windows.

Post Reply