Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUDs ➜ General ➜ Suggested protocol for server to client "out of band" messages

Suggested protocol for server to client "out of band" messages

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2  3  4  5  6  7  8  9  10 11  12  13  14  15  16  17  18  19  20  21  22  23  

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #135 on Wed 17 Feb 2010 03:41 AM (UTC)
Message
I was planning to remove them, with one or two exceptions they are probably just confusing. The GitHub repository (and the plugins page) can be used to grab ones you are interested in.

I haven't forgotten the work you are doing on modularizing them, it is the sort of thing we want to get right before settling on a system.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #136 on Wed 17 Feb 2010 04:26 AM (UTC)
Message
Thanks, Nick! I'm glad to hear it.

In regards to the modular plugins, I'll be releasing a few updated ones (including ATCP) very soon, and I helped a friend package LuaSocket directly into her plugin's libraries/ subfolder. Hopefully we'll have concrete examples to discuss in the near future!

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #137 on Wed 17 Feb 2010 05:10 AM (UTC)
Message
Nick, I kind of get the impression that you think I'm not enthusiastic about the possibilities here. I am. :) I am very much so. I've devoted a fair amount of thought, effort and conversation to this kind of protocol. I think that is why I am somewhat skeptical of simple solutions to what is a complex problem. For example, your "bar" idea is good, but makes it more difficult to express another kind of bar, for instance in an inventory window, which might display encumbrance.

Basically, we have in front of us an opportunity to do something very powerful. But we can't do that if our reaction is to say "well, it's just a suggestion for private use, so it's ok if it's not general". That's a fine goal, as I've said before; it's just a different goal.

I guess I'd like to know if we're trying to make something general or trying to make something for a special case, "whoever cares, whatever" group of people. I am very enthusiastic for the former -- otherwise I wouldn't have spent this much time here on the question ;) -- but the latter is less interesting to me (personally) because it doesn't really do something for me that I couldn't do before. Of course, the former problem -- making something general -- is also very difficult. You've already gotten a feel for some of the difficulties when doing even fairly simple things like health bars (like ordering, more kinds of bars, etc.).

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Xtian   (53 posts)  Bio
Date Reply #138 on Wed 17 Feb 2010 06:20 AM (UTC)
Message
Quick thoughts:

- as the health-bar-language is bound to evolve, even after first public implementation, we might want to use a special namespace for it: 'tt.102bar' ... something like this? This way we will never clash with homebrew implementations on that channel (ie older Aardwolf plugins, maybe?). You must decide if this case is likely, as I dont know many plugins that are out there ...

- how about grouping the data by miniwindow/plugin/screen-area, that shall grab it: tt.healthbar.bar.cur, tt.char.dead, ... and so on. (or shorter: tt.hb.bar.cur).
That way the healthbar-miniwindow will grab everything unter tt.hb. and display it and, in the future, we can add other bar-types: tt.hb.gradientbar.cur, tt.hb.gradientbar.max.
My propositions are: hb. for the healthbar, char. for global character data (may be used in any miniwindow), status. for a wide status bar at the bottom.

- the order things shall be displayed should be the order in which the server sends the data. Give the admins that power. Think of a MUD that uses the bars: beer, bladderfullness, aspirinlevel in a north German dialect ... Alphabetical order is not predictable from the spec side of things.

- the colour of the bar should be its own field. Probably in html-like #aabbcc format: t.hb.bar.colour= #aabbcc

- if a client omits some fields that have been used before the last known values should be used

Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #139 on Wed 17 Feb 2010 07:05 AM (UTC)
Message
Xtian said:
- as the health-bar-language is bound to evolve, even after first public implementation, we might want to use a special namespace for it: 'tt.102bar' ... something like this? This way we will never clash with homebrew implementations on that channel (ie older Aardwolf plugins, maybe?). You must decide if this case is likely, as I dont know many plugins that are out there ...

- how about grouping the data by miniwindow/plugin/screen-area, that shall grab it: tt.healthbar.bar.cur, tt.char.dead, ... and so on. (or shorter: tt.hb.bar.cur).
That way the healthbar-miniwindow will grab everything unter tt.hb. and display it and, in the future, we can add other bar-types: tt.hb.gradientbar.cur, tt.hb.gradientbar.max.
My propositions are: hb. for the healthbar, char. for global character data (may be used in any miniwindow), status. for a wide status bar at the bottom.

- the order things shall be displayed should be the order in which the server sends the data. Give the admins that power. Think of a MUD that uses the bars: beer, bladderfullness, aspirinlevel in a north German dialect ... Alphabetical order is not predictable from the spec side of things.


Personally, I'm a firm believer that the server shouldn't be sending presentation data unless the medium (i.e. this protocol) is explicitly intended for such. I very much prefer simply sending the semantic data, so the client can decide how to display it. What I mean is, bits of data should be named according to what they are, not how they should be displayed.

Nick's example code follows this quite well: the only presentational value is "seq", which is more of a hint and simply specifies the sequence of items like a linked list. I disagree that there should be a "bar" table at all - why can't experience be a "bar", for example? - but the rest is just data, pure and simple

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Xtian   (53 posts)  Bio
Date Reply #140 on Wed 17 Feb 2010 07:48 AM (UTC)
Message
I understand. The analogy with html/css comes to mind. Then proposing a differentiation between "bar" and "gradientbar" wasn't a good idea.

On the other hand, you can interpret "bar" simply as a data field which has a current value and a max value. What the client/plugin displays is up to it: for example using a vertical or horizontal gauge or some kind of pie graph.

But then, the bar colour is an important aspect of that data because it directly relates to how the user understands it. We will probably always want to colour code health in green.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #141 on Wed 17 Feb 2010 06:55 PM (UTC)
Message
Xtian said:

- as the health-bar-language is bound to evolve, even after first public implementation, we might want to use a special namespace for it: 'tt.102bar' ... something like this? This way we will never clash with homebrew implementations on that channel (ie older Aardwolf plugins, maybe?). You must decide if this case is likely, as I dont know many plugins that are out there ...


I don't really want to confuse data with presentation here.
I'm somewhat in agreement with David and Twisol here.

After all, your HP is a data field that will always have a specific meaning, whether it is shown in a bar, a box, in more than one place, or nowhere.


Xtian said:

- the order things shall be displayed should be the order in which the server sends the data. Give the admins that power. Think of a MUD that uses the bars: beer, bladderfullness, aspirinlevel in a north German dialect ... Alphabetical order is not predictable from the spec side of things.


Again, "the order the server sends the data" can be pretty hard to know. After all, I had in mind the data would arrive in pieces (eg. the max_hp only when it changes). In any case, I put in the "seq" field as a hint to the client the sequence to display in.

Xtian said:

- the colour of the bar should be its own field. Probably in html-like #aabbcc format: t.hb.bar.colour= #aabbcc


I already did that - the "clr" field.

Xtian said:

- if a client omits some fields that have been used before the last known values should be used


Did that too, in fact I mentioned in my post that my plugin tries to remember as much as it can so only a minimal amount needs to be sent when it changes.

In fact I am thinking that the server simply keeps the client up-to-date with stuff like the player's HP, mana, enemy etc. What the client does to display that information is largely up to it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #142 on Wed 17 Feb 2010 07:05 PM (UTC)
Message
David Haley said:

Nick, I kind of get the impression that you think I'm not enthusiastic about the possibilities here. I am. :) I am very much so. I've devoted a fair amount of thought, effort and conversation to this kind of protocol.


I'm enthusiastic that we are all working together towards the common goal of a better interface for MUD games. At the start of this thread I kicked the ball off (is that the expression?) with my original proposal, and in the light of various comments it has already been markedly improved.

I am a little concerned that we may end up spending forever on design, with little to show for it. For example, you asked why I didn't use ZMP - well I might ask "why doesn't anyone use it?". It is almost as if months, if not years of work went into designing it, but no-one wanted to actually implement it.

I am trying to juggle three things here, and by working with myself, at least at this early stage, I don't have to fight with myself to get design changes approved:


  • Changes to the client to support telnet negotiations (as implemented now)

  • Changes to the server to send relevant details, like HP, Mana etc.

  • A plugin that usefully displays all this.


As I work on this I find myself changing all three parts, and am in the happy position that I am able to do so. For example, in the process of trying to get a textured look I found that the Dissolve mode in WindowBlendImage was simply implemented wrongly (it changed the random choice for each of R, G and B, when it should have changed only once per pixel).

Then I find myself working on a generic gauge-drawing module.

I am hoping that the end product here will, at the very least, be enough knowledge for me to put forwards a design proposal that is not just theory, but demonstrably works in showing something like:


  • Player stats
  • Enemy stats during combat
  • Experience bar
  • Mobs in the current room
  • Stats of an entire group


I will continue to push my changes up to GitHub, so anyone who wants to can play with them on a private copy of SmaugFuss (or any server), and replicate my results, and perhaps make constructive suggestions about the look, or the design.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #143 on Wed 17 Feb 2010 07:51 PM (UTC)
Message
Nick Gammon said:
For example, you asked why I didn't use ZMP - well I might ask "why doesn't anyone use it?".

This is a very good question. I think that it comes down to two main points:

- Elanthis couldn't push the protocol as a de facto matter because he doesn't write a popular client. MXP for instance gained some traction simply because zMUD and then MUSHclient supported it -- and I would imagine that you implemented it because Zugg was implementing it, and it made sense to do so for that reason.

- Elanthis wasn't willing to evangelize to client authors to convince them to implement it.

Now for what it's worth I don't view ZMP as inherently superior, and this Lua protocol has a very marked advantage of being able to send structured data. (ZMP is "flat" only; you have lists of parameters but you can't pass a table or list as a parameter.)

I wouldn't say that years went into ZMP itself, mainly because Elanthis didn't really push it beyond the initial concept. It came up again recently on MudBytes as a protocol, but it's hard for a bunch of server authors to work on something without client cooperation (and a lot of people don't really know how to write stuff for clients). And indeed until miniwindows, it was hard to find clients that supported subwindows in the first place.

Nick Gammon said:
I am hoping that the end product here will, at the very least, be enough knowledge for me to put forwards a design proposal that is not just theory, but demonstrably works in showing something like:

<stats, etc.>

I find that the really hard part comes when trying to generalize this. It's "relatively easy", from a protocol's standpoint, to design something for a particular MUD. The semantics are clear: you don't have to worry that everybody means something similar when they speak of a group of players, or mobs in a room, or even what a room is in the first place! But anyhow, the work here is mainly in getting the client to display this information; it's not easy to do that, especially if you don't have the power of miniwindows backing you up.

I think that it is, honestly, somewhat hopeless to try to create a definition of semantics that covers every MUD out there. You run into serious trouble even with relatively obvious differences like room-based vs. coordinate-based.

The advantage to communicating presentation is that the MUD can simply decide what an appropriate interface is. The disadvantages are pretty obvious too and we've discussed them before.

It might come down to having packages of sorts for various kinds of MUDs. Or, mixing presentation and data. You can communicate half-data/half-presentation fairly easily kind of like HTML: you send structured data, calling things tables, rows and columns in tables, etc., and tagging them with what kind of table/row/column they are. The client can then present this stuff how they feel like.
Contrast the above with some very generic "this is inventory: obj1, obj2, obj3".

I think that the bulk of the work here is in identifying interface concepts (gauges, tables, maps, etc.) and then figuring out what typical mappings are. You can perhaps give presentation hints, so that a client that implements basic GUI elements can still present stuff, while a client that wants to do something special can do whatever it feels like.

Even though it's difficult to ontologize all possible MUD data, in the end of the day there aren't that many ways to actually structure things. You have primitives, lists, maps, graphs. So a protocol that purports to address this general problem should let you structure data in this way, while preventing namespace collision. Then if people want to do things differently, that's fine.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #144 on Wed 17 Feb 2010 08:42 PM (UTC)
Message
David Haley said:

The semantics are clear: you don't have to worry that everybody means something similar when they speak of a group of players, or mobs in a room, or even what a room is in the first place! But anyhow, the work here is mainly in getting the client to display this information; it's not easy to do that, especially if you don't have the power of miniwindows backing you up.


Well that is why I am really aiming at communicating low-level stuff, like your HP and your enemy's HP. A hint that they should be shown in green, and that HP is "more important" than mana is useful, particularly if someone is writing a server in (say) Chinese.

Having played a few MUD games in the past, supplemented with quite a bit of playing World Of Warcraft, Age of Conan, WarHammer, Runes of Magic, plus various single-player games, I think the basic concepts don't change that much. Players usually have some sort of health, which goes down in battle, some sort of energy or mana which they consume to do things, buffs and debuffs (which Final Fantasy calls "status effects"), often some sort of group, and usually a target of their attacks.

One of the things I am trying to do is allow for generality without getting bogged down by it (hard enough, as you know).

For example, in the screen shot I posted, the player name and level can be omitted if not known. The number of bars can be one or many. Status effects can be present or absent. If have put some time into "wrapping" code so it would theoretically handle dozens of buffs/debuffs.

Now that I have a basic "status box" going, I am making it more modular so that the enemy's box is just another instance of the same concept. Ditto for party members.

Once I have a more elaborate example going (backed up by example server code), then I would like to ask: "well, in what way does this *not* work for you?". And maybe in answering that question we might find improvements.

Meanwhile, users of other clients, who perhaps don't have miniwindows, can still pull out at least some of the data and display it in status bars, or the occasional "note" in the main output window.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #145 on Wed 17 Feb 2010 09:48 PM (UTC)
Message
It's true that basic concepts don't often change. Things get hairy for more complex information, like quest status/journals, inventories, spell books, maps, and so forth. Some of these -- maps in particular -- are hairy to implement because the concept of a map actually changes depending on the MUD. MUDs that use rooms don't (usually) have positions-within-rooms, and MUDs that are purely coordinate-based won't have rooms at all. And then you've got the various SW MUDs, that mix rooms on planets and systems-with-coordinates in space.

Nick Gammon said:
Once I have a more elaborate example going (backed up by example server code), then I would like to ask: "well, in what way does this *not* work for you?". And maybe in answering that question we might find improvements.

This seems like a fine approach to me. That said, it would help to bring this to a larger audience of server developers, simply because I am not necessarily the best aware of what people are doing in LP-land, for example.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Orik   USA  (182 posts)  Bio
Date Reply #146 on Wed 17 Feb 2010 11:42 PM (UTC)
Message
Here is what I have done so far in an envy codebase:

www.admud.com/download/newscreen.html

www.admud.com/download for the plugins I've used but have since made a little different.

I've really enjoyed it so far and my playerbase has as well, not to mention, Nick has a few more mushclient users now. heh.

I'm very interested in the prospect of adding different ideas to this. I'm in the process of figuring out how to show groups, but that's probably something that we as a forum can come up with.

I love it though!
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #147 on Thu 18 Feb 2010 03:09 AM (UTC)

Amended on Thu 18 Feb 2010 03:11 AM (UTC) by Nick Gammon

Message

Things are progressing:

This image shows:

  • Cooler-looking window with 3D-style borders
  • Nick (level 2) with a Bless buff
  • Group member Jerirath's stats also shown underneath
  • Combat target "carrion crawler" stats shown (almost dead)
  • Text window moved away a bit to make it less cluttered.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #148 on Thu 18 Feb 2010 03:17 AM (UTC)

Amended on Thu 18 Feb 2010 03:18 AM (UTC) by Nick Gammon

Message
The expanded out (by tprint) data structure to achieve that was:


"combat"=false
"group":
  1:
    "poisoned"=false
    "name"="Jerirath"
    "dead"=false
    "combat"=false
    "level"=2
    "xp":
      "max"=9200
      "cur"=6370
    "bar":
      "Mana":
        "max"=91
        "cur"=91
      "HP":
        "max"=44
        "cur"=44
      "Move":
        "max"=210
        "cur"=200
"xp":
  "max"=31050
  "cur"=10295
"tt"="status"
"buffs":
  1="bless"
  2="bless"
"name"="Nick"
"gold"=15310
"poisoned"=false
"level"=3
"dead"=false
"bar":
  "Mana":
    "max"=94
    "cur"=94
  "HP":
    "max"=59
    "cur"=34
  "Move":
    "max"=220
    "cur"=200


The raw data from the MUD was:


tt="status"; name="Nick"; bar={HP={cur=34; max=59}; Mana={cur=94; max=94}; Move={cur=200; max=220}; }; xp={cur=10295; max=31050}; group={[1]={name="Jerirath"; bar={HP={cur=44; max=44}; Mana={cur=91; max=91}; Move={cur=200; max=210}; }; xp={cur=6370; max=9200}; level=2; combat=false; dead=false; poisoned=false; }; }; gold=15310; level=3; combat=false; dead=false; poisoned=false; buffs={"bless"; "bless"; };


I haven't really tried to optimize it, for example the maxima could be omitted until such time as you level.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #149 on Thu 18 Feb 2010 03:25 AM (UTC)
Message
I would suggest changing "bar" to "stat", but otherwise it looks like you've got a cool thing going there. Though might I suggest an extension to "tt"? Perhaps allow it to be something along the lines of "package.message", or even "package.subpackage.message" and so on, and implement your message-handling functions to mirror the setup (i.e. package = { subpackage = { message = function() end } }). That would allow you to implement something like ZMP's packages, provide a clean way to namespace things, and make it dead easy to add more messages and more handlers in a structured manner.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


928,612 views.

This is page 10, subject is 23 pages long:  [Previous page]  1  2  3  4  5  6  7  8  9  10 11  12  13  14  15  16  17  18  19  20  21  22  23  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.