Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Tue Jun 24, 2008 6:57 am   

MXP <image> help
 
Alright, so I've been working on my MUD for years and have made several attempts
to deal with imaging in MXP.. It always tends to just frustrate me to the point of no return
and I give up on it for months if not years. And I've got just about everything settled
out, but I'd REALLY like to know how to make the image tag accept a percentage or
character size for the height/width attributes..

The MXP spec page says it can be done
(as it has said for years), but has NO information on how to actually do it. I've tried
H="50%", H="%50", H="1c", H="c1" and numerous other combinations, but nothing
seems to work.

I've finally decided to break down and ask for some help, so any such
help would be appreciated. I'm not 100% sure this is the right forum for this question,
but none of the other forums on the list seem to match. If I can just get past this one
barrier, I'll be golden.

(And I really think that the MXP spec in the support library should
have this information posted.. In example usage of the <image> tag if nothing else..
Just to prevent the frustations that I have been through for others.)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jun 24, 2008 6:49 pm   
 
Unfortunately, there isn't any way to specify a percentage or character width. I should probably update the MXP spec since right now zMUD/CMUD only support direct pixel sizes for the width and height, and I think zMUD/CMUD are the only clients that support the image tag at all.

Mainly the image tag is just intended to display the graphics image as downloaded in its native size.

Edited: It might not be too hard to add this feature, but I'd need to know more about what you are actually trying to do with this.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 25, 2008 6:11 pm   
 
I've added this to v2.29 of CMUD. The syntax in 2.29 is to put a "c" (or "C") at the end of the number for character sizes, and a % at the end for percentages. For example:

#MXP <IMAGE test.gif W="25%" H="1c">

will display the image stretched to 25% of the screen width and 1 character high.
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Wed Jun 25, 2008 6:28 pm   
 
Dang Zugg, you went on a tear today... new features, bugs squashed and the day's only half done!!! Keep up the great work.
_________________
Asati di tempari!
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 25, 2008 7:02 pm   
 
Well, the work has been going on for several days...I just updated all of the forum posts at the same time today ;)
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Wed Jun 25, 2008 7:45 pm   
 
Ah.. Heheh, well, that's nice to know. Basically, I use a map system that I designed myself and wanted players to be able to select images as character avatars to move around on it, but unfortunately, the image has to be sized properly to keep the text characters that make up the map from shifting around unnaturally.. I figured that if I could make it so that the image is 1 text character high by 1 text character wide, players wouldn't be required to run at a specific font size or custom configure the pixel width/height of their avatar to make it look right. I'll give 2.29 a try and see if it works out properly, but since this is a CMUD implementation, unfortunately my ZMUD players will still be out of luck. But it's better than no hope at all for making it work the way I want. I suppose I'll just have a pixel size configuration for ZMUD players and let them figure out how to make it work without breaking stuff. Another solution I had was to allow the images to overlap text without actually trying to push it out of the way, but I didn't see anything like that in the mxp spec and doubt it will be planned.. Plus I kinda like the character width/height solution better anyways.

So, what it boils down to is: Thanks for the fix and the reply.. :P Kinda makes me feel better about paying for ZMUD twice and CMUD once now over the past 6-7 years. Though you were quick on the ball last time I had a problem as well. Great service!
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Wed Jun 25, 2008 10:25 pm   
 
Another issue I've recently run into (As I've only started testing on CMUD very recently) is the fact that my frames don't seem to behave properly in CMUD. They still work just perfectly in ZMUD, howver, so I'm at a bit of a loss. Basically, what I have going is this:

The MUD server tells the client to create a new window for the aforementioned map system called 'map'.
Any time the player types 'map', the MUD checks for MXP usage and all that and sends the command <FRAME map REDIRECT>
The map is sent through, then the mud sends <FRAME _previous REDIRECT>

This works great in ZMUD, but I've done a bit of testing over the past hour or so in CMUD and the _previous tag just doesn't seem
to work. For example, when I go through the following:

#MXP <frame test height=4c>
#MXP <frame test redirect>
look
#MXP <frame _previous redirect>
look

The initial look is sent to the test frame, and then, so is the 2nd one. _top doesn't seem to work either.
I'm wondering if this functionality is broken in CMUD, intentionall left out, the syntax is altered or I'm just missing something here.
I understand that the <DEST> command can be used for similar functionality and </DEST> seems to work just fine in redirecting back to the top window,
but the backbone of my MUDs usage of frames is geared around the <frame> functions. I can recode it easily enough, but this is a bug, I figure it
doesn't hurt to report it and see what you guys think about it, as I'd like to continue using _previous where I need to.

It wouldn't really bother me as much if CMUD didn't decide to crash when I closed out the frame it was redirecting to and it had nowhere to send the text. Zmud does the same thing if _previous isn't used to get back to the main window at some point.. Perhaps some sort of check could be put in that says "This window no longer exists.. I'm going back to the main window.." if said window is closed? I know this wouldn't fix my problem, but it would prevent a CMUD crash.
Reply with quote
Nicodareus
Wanderer


Joined: 24 Jun 2008
Posts: 68
Location: Texas

PostPosted: Wed Jun 25, 2008 10:34 pm   
 
Also, a quick note, the character height/width tags work like a charm! No longer do I need to try to resize the image based on font size/etc. The image is properly resized without making the map go nuts! Thank you!


Addendum: I'm going to just close out this thread and start a new one as I've run into a lot of hiccups with CMud/MXP in general and would like to start a topic more clearly stating my mind and opinions on a few things.

Edit: Or not, since you apparently can't close your old threads.. Ehe.. but I'm still gonna starta new one for simplicities sake. Or maybe I'm just OCD like that.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net