HTML5 Client Questions and Such

1910111214

Comments

  • As a non-professional and very amateur coder, I found Javascript (as the first real language I learned; mostly just zMUD's scripting before that) to be pretty simple and intuitive. Doing complex things in Javascript can be a bit daunting at first, but simple things are as easy as any language (and you generally don't need anything terribly complicated for Achaea).
  • You are Achaea's math hero, and I am fairly sure you are also a very competent coder - even if everyone has to start somewhere.  The thing is, some people take to coding easily.  Some people have to REALLY work to get decently comfortable with IF statements.  Different people have VERY different experiences with coding. 

    It is super frustrating when the first group insists on telling the second group that our experience is basically invalid because "it was simple for me".  There is a reason the webclient largely languishes unused, and I am pretty sure at least part of it is the squirrely looking language of JS (not that it is going to change either way).
  • edited October 2016
    Kiskan said:
    You are Achaea's math hero, and I am fairly sure you are also a very competent coder - even if everyone has to start somewhere.  The thing is, some people take to coding easily.  Some people have to REALLY work to get decently comfortable with IF statements.  Different people have VERY different experiences with coding. 
    I'm not comparing people and how good they are at coding (I'm not very good, by the way; I might just barely be able to manage it professionally, if I studied a bit more, but I'd be pretty slow), I'm comparing languages. Compared to the other languages I've read/used, Javascript is one of the simplest.
    Kiskan said:
    There is a reason the webclient largely languishes unused
    I really doubt the webclient has lost that much popularity, I'd be pretty confident in guessing that if it's not the most popular client, then it's a close second behind Mudlet.
  • I do think the webclient definitely gets used a LOT by very new players, and possibly players who mainly just "potter about".  That is part of its function.  

    But I also think if those people start to get more serious about say, combat, they're going to hit a wall where they're going to have to deal with JavaScript - and I am arguing that a lot of people are going to find that language quite intimidating (more intimidating than other languages clients might use).  
  • ZahanZahan Valhalla
    edited October 2016
    @kiskan Whoever told you python was easier to learn, was lying to you in a real sadistic way.  It takes more code to achieve the same effects and it's not nearly as intuitive (see: like other languages) as other languages.  Python is also dependent on the white space you code with, and you can break something just by misplacing blankness.  It's true that it's powerful as all hell but that power (which is more than you'll ever need for achaea reflexing) comes at the price of slower processing.  Python is also used by a lot less people.

    Javascript is pretty intuitive (see: like other languages), by comparison.  You can learn javascript and near seamlessly transition to other languages(php and lua for example), and vice versa.  It's harder to break and easier to learn, and far more widely used (there are waaaay more "web designers" out there than there are software developers).  It also processes a lot faster.

    Really, though, your best bet might be to download a standalone mud client and set that up exactly how you want.  There are clients you can even put on, and play from, a flash drive to get similar portability.  Want to use python?  No problem!  You can download the library, drop it in a folder, and you're ready to go (at least on mush).

    Coders already tend to be neglected in favour of roleplayers so I can't see them diverting resources towards adding a language that fewer people use, is harder to use (whitespace), takes longer to process, and has to be downloaded first.  I've been surprised before, though.

    If you're struggling with javascript, post your question.  I'm sure at least a few of us understand it well enough to offer some help.
    Click here for Nexus packages
    Currently available: Abs, Cnote, Keepalive, Lootpet, Mapmod
  • edited October 2016
    I'm pretty committed to Mudlet for now (which is the current de facto standard client).  Python seems to be taught a lot of places, a lot of people I know in game or out of game seem to have learned (or are taking required classes in it currently or in the future), so hrm... I don't know.  The reason I brought up the language though, is because it would be wonderful to have the webclient be the "standard" client that everyone points to and says "this is pretty much as good as it gets, and most people use THIS" (which doesn't seem to have happened for the webclient yet).
  • ZahanZahan Valhalla
    Kiskan said:
    I'm pretty committed to Mudlet for now (which is the current de facto standard client).  Python seems to be taught a lot of places, a lot of people I know in game or out of game seem to have learned or (or are taking required classes in it currently or in the future), so hrm... I don't know.  The reason I brought up the language though, is because it would be wonderful to have the webclient be the "standard" client that everyone points to and says "this is pretty much as good as it gets, and most people use THIS" (which doesn't seem to have happened for the webclient yet).
    That would be nice but I think that's a pipe dream.  There are open-source clients that have been in development for longer than achaea was an idea floating around in Matt's head.  The nexus client is a baby by comparison, and worked on by a single company, with clearly defined objectives (not having to download anything).  It really excels at what it tries to do, but if it tried to compete with other clients in every way, it would need more development to be in the runnings.  

    Hopefully that happens but I think, again, it's a pipe dream that will take years if ever, and the problem remains that these other standalone clients aren't being neglected (both mush and mudlet pushed out updates this fall).  If portability is your need (like back when i was a teenager playing achaea on the library computers in 1 hour blocks) you really can't beat nexus but if that doesn't matter, it can be argued you're better off pushing for mudlet updates.

    That said, I think it's cool they're doing anything to the nexus client.  I was surprised when they added the ability to add your own triggers.  I'm convinced they've made it infinitely easier for new players to get into achaea, which we need.  More of that is always welcome.

    I also wouldn't mind seeing an update to their mobile apps that haven't seen one in 5 years.
    Click here for Nexus packages
    Currently available: Abs, Cnote, Keepalive, Lootpet, Mapmod
  • Mudlet only goes back to 2008.  Although... it benefited from being the pet project of several young, talented coders with way too much free time (amazingly, it has continued to be supported and updated incredibly well).  That said, Mudlet immediately blew everything out of the water.  It became the standard in a way that no client ever really had, actually - which meant lots more people helping each other and sharing tips.  I don't know that it's a pipe dream for the webclient to match that kind of impact - but it just might not be what they decide to do.
  • ZahanZahan Valhalla
    edited October 2016
    Kiskan said:
    Mudlet only goes back to 2008.  Although... it benefited from being the pet project of several young, talented coders with way too much free time (amazingly, it has continued to be supported and updated incredibly well).  That said, Mudlet immediately blew everything out of the water.  It became the standard in a way that no client ever really had, actually - which meant lots more people helping each other and sharing tips.  I don't know that it's a pipe dream for the webclient to match that kind of impact - but it just might not be what they decide to do.

    I don't know that I agree entirely with that, in that it blew away everything in a way nothing ever had.  I remember the days of zmud, that was a freaking godsend and basically the only client that people used other than super obscure stuff like wintin or the website.  Most people used that, even though it cost 30$.  People still use it.  That with the few other mainstream clients, lends me to believe that there is more client diversity now than ever before.

    When a new client hits the market with new and exciting stuff (like a more powerful code base), there is a mass switch over.  Nothing really ground-breaking has been done since mudlet (which is why it's still so popular).  Being that now, we have clients using lua and python and javascript, and have amazing 3d mappers, there really leaves little left to break ground on.  Hopefully they do though, like you said: if that's their intent.  I think short of that, it's going to be hard getting people to switch off a client they may have been using since 2008 or earlier and that already has everything being offered.
    Click here for Nexus packages
    Currently available: Abs, Cnote, Keepalive, Lootpet, Mapmod
  • edited October 2016
    Mudlet's downfall is that a lot of people really dislike Lua (you'll find lots of commentary peppered around various forums, and certainly on channels in game).  In short, if there was a strong, powerful client that used a language lots of people like and that is perceived as "friendly" and WELL DOCUMENTED (everything I'd ever heard told me this might be Python, but maybe not), I think you'd see a big migration.  
  • TectonTecton The Garden of the Gods
    Interesting discussion! 

    One common misconception is that we're trying to "out-do" or compete with other clients, like Mudlet. To be 100% honest, we don't care what client you use to connect to our games, as long as you're connecting and having fun!

    Regarding Nexus: We will continue to improve and refine the client, adding in features for the mud novice who has no idea what a MUD is, through to the technically proficient player who want's to dig in to the inner workings to provide a customised experience just for them. Many of our recent pushes have been aimed at removing the intimidating "need to know how to code to play" stigmas (simplified scripting/Events/auto-populating variables etc.), but we're always improving things like the backend API to open up new possibilities for the advanced players.

    Saying that, adding in more scripting languages to the backend isn't something we're considering at this time, sorry!
  • AhmetAhmet Wherever I wanna be
    As far as scripting goes, JavaScript is pretty user-friendly and easy to learn, compared to most languages. It's also extremely lightweight, very powerful, and supported by literally every single browser. There really isn't a better choice for the webclient by any stretch of the imagination.

    And @Kiskan, I don't think I've ever heard anyone complain about the fact that Mudlet uses Lua. It's more beginner-friendly than Javascript is, and there aren't very many drawbacks to it.
    Huh. Neat.
  • Visitor from Lusternia. I've been working on a number of packages to share there. From what I've seen in Lusternia, Mudlet has the huge edge more because there's already packages out there for everything, more than because it's actually technically superior -- and certainly not because of whether Lua or JavaScript is easier to learn. The vast majority of Lusternia players aren't developing any more than a few triggers on their own, and simple ones -- the kind Nexus is getting especially good at helping non-coders do. But it'll never push aside Mudlet until there's downloadable systems for everything. And I doubt I will be changing that -- I'm going to make a few cool things available but I'll never make a combat system to compare with M&M (or even at all).

    If we want to talk about technical considerations, can we PLEASE talk about the fact that Nexus doesn't save its variables unless I remember before every logoff or disconnect to go do them manually? It doesn't even give me a script function call I can use to do it myself, or if it does, no one's told me what it is. It is SO smart at so many things, so it's bewildering that it doesn't do this most basic thing. C'mon, can we get this fixed sooner than later? It can't be that hard to make a script call that does whatever that Save button does already.
  • TectonTecton The Garden of the Gods
    Kilian said:
    Visitor from Lusternia. I've been working on a number of packages to share there. From what I've seen in Lusternia, Mudlet has the huge edge more because there's already packages out there for everything, more than because it's actually technically superior -- and certainly not because of whether Lua or JavaScript is easier to learn. The vast majority of Lusternia players aren't developing any more than a few triggers on their own, and simple ones -- the kind Nexus is getting especially good at helping non-coders do. But it'll never push aside Mudlet until there's downloadable systems for everything. And I doubt I will be changing that -- I'm going to make a few cool things available but I'll never make a combat system to compare with M&M (or even at all).

    If we want to talk about technical considerations, can we PLEASE talk about the fact that Nexus doesn't save its variables unless I remember before every logoff or disconnect to go do them manually? It doesn't even give me a script function call I can use to do it myself, or if it does, no one's told me what it is. It is SO smart at so many things, so it's bewildering that it doesn't do this most basic thing. C'mon, can we get this fixed sooner than later? It can't be that hard to make a script call that does whatever that Save button does already.
    This is already approved for the next version! Fair warning though, this won't be something you'll be able to call very frequently when it goes in. 
  • AhmetAhmet Wherever I wanna be
    Use cookies instead?
    Huh. Neat.
  • Tecton said:
    This is already approved for the next version! Fair warning though, this won't be something you'll be able to call very frequently when it goes in. 
    Hallelujah! I understand about the burden -- I will put it into my logoff trigger, and maybe I'll throw it into a few major operations now and then, like fully inventorying a shop, and that's it. No calling it every time something changes.

    Any possibility of a function call that lets scripts use the play-sound and desktop-notification thingies we recently got in actions?
  • AhmetAhmet Wherever I wanna be
    @Kilian both of those things should be available through the javascript Audio and Notification objects, unless I'm sorely mistaken.
    Huh. Neat.
  • Ahmet said:
    And @Kiskan, I don't think I've ever heard anyone complain about the fact that Mudlet uses Lua. 

    Then you haven't really been listening to people talk about it. There are lots of people who hate that Mudlet uses lua, and there are lots of reasons for that.

    Firstly, it has a garbage string library; in a text-based game this is a massive failing. As an example, it forces the user to code their own str.split() function.

    Secondly, it has a terrible object model. Instead of a sensible "table.contains(item)" you have this awful "Table.contains(table,item)" stuff.

    Thirdly, it makes a bunch of really weird design decisions for no apparent reason. Things like ~= for inequality instead of the standard !=. It uses 1-based indexing, which is profoundly unnatural. Zero evaluates to true, which is straight up WTF material.

    Fourthly, it's a language designed for embedded systems. This means that it forgoes things like x+=1 due to Fancy Compiler Bullshit. This isn't straight up infuriating, because there is a good reason for it, but it is a reason to hate the language.

    Fifthly, it's very easy to pollute the global namespace because locals must be specified and globals are the default, which is completely ass-backwards.

    Sixthly, using lua isn't going to be a performance increase unless you are playing Achaea on your fucking toaster. Incidentally, toaster-Achaea is the kind of thing lua was designed for.

    Seventhly, zero evaluates as true why the fuck would they even do that what were they thinking.
  • @Nazihk because 0 is a value (as opposite to nil), but its meaning is not inherently "not true) (as opposite to false). Most other languages don't even allow non-boolean types to be directly interpreted as boolean.

    Mudlet tries to build some of the "missing" library functions like str.split(), which is part of Mudlet. But the standard library is meant to be as slim as possible, so only the bare minimum is contained. Use luarocks to install more libraries.

    Inequality is just a language quirk, as is 1 based indexing (but I as a prpfessional coder actually like it. It's more nazural to me).

    It's not knly for embedded systems, but also embedding into other programs, which it was very easy to put the interpreter into Mudlet.

    JS makes it also easy to pollute the glibal namespace. But it just takes discipline I guess.
  • AhmetAhmet Wherever I wanna be
    edited October 2016
    Nazihk said:
    Ahmet said:
    And @Kiskan, I don't think I've ever heard anyone complain about the fact that Mudlet uses Lua. 

    Ken addressed most of this, but I wanted to add a few things.

    Firstly, it has a garbage string library; in a text-based game this is a massive failing. As an example, it forces the user to code their own str.split() function.

    As keneanung said, Mudlet replaces plenty of the missing functions (including string.split).

    Secondly, it has a terrible object model. Instead of a sensible "table.contains(item)" you have this awful "Table.contains(table,item)" stuff.

    The table.contains function is also a creation of Mudlet. This is due to the way tables are actually created in Lua, though it's not so much a drawback as a syntactical preference. Not to mention, you can actually get around this with some syntactical wizardry, if you really wanted to.

    Thirdly, it makes a bunch of really weird design decisions for no apparent reason. Things like ~= for inequality instead of the standard !=. It uses 1-based indexing, which is profoundly unnatural. Zero evaluates to true, which is straight up WTF material.

    Addressed by Ken.

    Fourthly, it's a language designed for embedded systems. This means that it forgoes things like x+=1 due to Fancy Compiler Bullshit. This isn't straight up infuriating, because there is a good reason for it, but it is a reason to hate the language.

    Boo hoo. Partially addressed by Ken. Not being able to use += isn't by any means a reason to "hate" the language. It's a minor complaint at best. If you're really that miffed about it the five keystrokes it takes to type the variable twice, I dunno what to tell you.

    Fifthly, it's very easy to pollute the global namespace because locals must be specified and globals are the default, which is completely ass-backwards.

    So? From a non-coder perspective, it's much easier to learn this way, really. If a newcomer defines a variable in one place, they expect to be able to access it in other places. Polluting the global namespace is rarely a problem, and in most cases it ends up in serendipitous convenience.

    Sixthly, using lua isn't going to be a performance increase unless you are playing Achaea on your fucking toaster. Incidentally, toaster-Achaea is the kind of thing lua was designed for.

    This is simply false.


    Seventhly, zero evaluates as true why the fuck would they even do that what were they thinking.

    Again, addressed by Ken.

    Seems to me you can't get over a few minor syntactical changes, which are traded off for a metric fuckton of user-friendliness in a language that is light-weight, easy to learn and much more natural-feeling than most other programming languages.

    Maybe Mudlet should have used Brainfuck instead. At least then you couldn't complain about obscure constructs.

    In all seriousness though, what would you have preferred Mudlet use? I can't think of many alternatives that would be feasible, much less better.
    Huh. Neat.
  • Basically, here is the problem.  You have people like me, who, especially to start with, don't know enough about coding to know which languages would be "best" for people who don't "just get" the seeming moon logic of certain languages.  

    So we have to ask guys like you, who DO get that moon logic (and are often baffled that everyone doesn't).  Every once in awhile, someone who can actually code truly understands what is and isn't "moon logic" to the rest of us, and can bridge that gap, and then people like me can actually start to learn a thing or two (hopefully in a language that isn't totally baffling).  And from what I see, Lua is not "totally undoable", but it definitely throws me (though not as much as what I saw of JS, which made me nope nope nope out of the gate).  
  • AhmetAhmet Wherever I wanna be
    It seems you're basing your evaluation of lua (and JS) on a single language in particular? Every language has its quirks. Think of it from the perspective of someone who's never coded before, in any language. Things like mytable[1]. That should give me the first element in a table. If it doesn't, I'mma start asking what the fuck is going on. If I set x = 5, x should equal five when I try to call it. 0 is different from false.

    I guess at this point it's mostly personal preference, but you prefer those things because that's what you've learned to use. Indexing that starts at 0 isn't natural, its a holdover from early machine language restrictions. 0 evaluating to false isn't natural (and to be perfectly fair, it doesn't evaluate as true, either), it's mostly a left-over practice from languages that didn't (or still don't) have explicit boolean data types, wherein most coders would use 0 and 1 instead, or true and false statements would equate to 0 and 1 in another datatype. It's like Roman numerals versus Hindu-Arabic. One's much more natural and easy to understand, but the transition was heavily resisted for a variety of reasons.
    Huh. Neat.
  • Yeah, it's all syntax anyways. I like Lua for some of its simplicity, I dislike it for some of its missing features (no continue? Come onnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn), and it's certainly less difficult than something like Lisp. 
  • ZahanZahan Valhalla
    @kiskan It seems to me, you're locking yourself out with a lack of confidence.  Girlie (that's what I call her) will look over my shoulder at my code and say, everytime, "That makes my head hurt."  And every single time, I point slowly to elements and explain "this is doing this, see?" and then she goes, "oh yeah, that makes sense."

    The next day, the exact same scenario.  And this has been going on for years.  She simply lacks the confidence in herself to understand it so she shuts herself out before she even tries, even though she is more than capable of understanding it.  I see you doing that exact thing.  The truth is, it's really not that hard or cryptic.  If you're motivated to have it, you'll get it done.  You just have to start slow and small.  Don't look at all of it at once, but just look at a tiny piece and make sense of that.  

    A huge trick to coding, at least for me, has been having a decent memory.  Or at least, having a controlled environment that allows you to focus (so you have a better chance to retain).  You can have all the best theory in the world, but if you can't remember any of the syntaxes, you'll spend your entire days sifting through function indexes.  This is why I always advocate starting small with simple stuff.  Repeat those most basic syntaxes as you do simple stuff, then it's easier to dissect the more complicated functions.

    On the contrary, you can be absolutely terrible with coding theory, but still get done complex tasks with dirty nasty repetitive code.  Remember that any complex function you might use, is really just a series of small simple functions coded together behind the scenes for you already.  You don't even have to use the complex functions to achieve those results, if you understand the simple basic stuff well enough.

    If you were in here sputtering nonsense like "y is dis so hard" and talking like a fool, I might question your ability to syntax properly, but you write well, with proper grammar and excellent sentence structure.  While I do agree coding is a small bar to be super competitive, it's a bar you can learn to hurdle.  Girlie has no motivation, so I don't bother to really try to teach her, but if you ask questions here, you're liable to get a few answers and chances are at least one is legible.

    But you gotta believe!  Start with something tiny and insignificant (just basic highlight triggers, for example, that simply echo more text when something happens), and work up from there.  Ask questions.  You can do it.


    Click here for Nexus packages
    Currently available: Abs, Cnote, Keepalive, Lootpet, Mapmod
  • Ahmet said:
    Seems to me you can't get over a few minor syntactical changes, which are traded off for a metric fuckton of user-friendliness in a language that is light-weight, easy to learn and much more natural-feeling than most other programming languages.

    Maybe Mudlet should have used Brainfuck instead. At least then you couldn't complain about obscure constructs.

    In all seriousness though, what would you have preferred Mudlet use? I can't think of many alternatives that would be feasible, much less better.
    Python, really.

    I'm not saying that lua is unworkable or even terrible(even though I personally hate it), I'm just saying that there are reasons for people to dislike lua and wish that the primary client used a different language. 
  • Ahmet said:
    It seems you're basing your evaluation of lua (and JS) on a single language in particular? Every language has its quirks. Think of it from the perspective of someone who's never coded before, in any language. Things like mytable[1]. That should give me the first element in a table. If it doesn't, I'mma start asking what the fuck is going on. If I set x = 5, x should equal five when I try to call it. 0 is different from false.

    I guess at this point it's mostly personal preference, but you prefer those things because that's what you've learned to use. Indexing that starts at 0 isn't natural, its a holdover from early machine language restrictions. 0 evaluating to false isn't natural (and to be perfectly fair, it doesn't evaluate as true, either), it's mostly a left-over practice from languages that didn't (or still don't) have explicit boolean data types, wherein most coders would use 0 and 1 instead, or true and false statements would equate to 0 and 1 in another datatype. It's like Roman numerals versus Hindu-Arabic. One's much more natural and easy to understand, but the transition was heavily resisted for a variety of reasons.

    I'm going to stay out of the language debate, but I feel obligated to note that the idea that 0-based indexing is due to a legacy implementation detail exclusively is incorrect.

    Source if interested:

    http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

  • Any post referencing Dijkstra immediately wins the thread. 

  • Mike "Dijkstra"? 
  • Makarios said:
    Ahmet said:
    It seems you're basing your evaluation of lua (and JS) on a single language in particular? Every language has its quirks. Think of it from the perspective of someone who's never coded before, in any language. Things like mytable[1]. That should give me the first element in a table. If it doesn't, I'mma start asking what the fuck is going on. If I set x = 5, x should equal five when I try to call it. 0 is different from false.

    I guess at this point it's mostly personal preference, but you prefer those things because that's what you've learned to use. Indexing that starts at 0 isn't natural, its a holdover from early machine language restrictions. 0 evaluating to false isn't natural (and to be perfectly fair, it doesn't evaluate as true, either), it's mostly a left-over practice from languages that didn't (or still don't) have explicit boolean data types, wherein most coders would use 0 and 1 instead, or true and false statements would equate to 0 and 1 in another datatype. It's like Roman numerals versus Hindu-Arabic. One's much more natural and easy to understand, but the transition was heavily resisted for a variety of reasons.

    I'm going to stay out of the language debate, but I feel obligated to note that the idea that 0-based indexing is due to a legacy implementation detail exclusively is incorrect.

    Source if interested:

    http://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/EWD831.html

    Been playing extensively with Javascript recently, coming from Lua, and I must admit, the biggest thing I hated about that transition was looping ending with a (< length+1). 

    array with N elements
    for (var k=0;k<N+1;k++)

    gave me the shits every single time I typed it. Foreach apparently has a small performance hit so I don't use it.

    That said, those arguments presented make sense and it is significantly easier to do range calculations on 0-indexed things, in my limited experience.
  • for (int i = 0;i<=N;i++)

    And really that's one of the primary arguments against the 1-based indexing. Zero-based indexing is the standard and you're not doing anybody any favors by getting them used to 1-based indexing. 
Sign In or Register to comment.