@faraday said in Getting Young Blood Into MU*'ing:
@Griatch said in Getting Young Blood Into MU*'ing:
But overall - this thread makes me feel like that I should really sit down to learn more web-dev stuff. I can do it, but it's not really coming easily to me, dammit ...
Web dev doesn't come easy to anyone. And that's kind of the problem I ran into with Ares. It's 1000% easier to add the text-based commands to Ares than to add anything on the web side. It can be overwhelming, especially to folks without a lot of coding experience. People have done it, but it is not an easy learning curve.
Also, with Django - I wouldn't be surprised if you eventually run into the same issues I had when Ares was using server-side rendering. The more I added to the portal and the more people used it, it started to really impact server performance. That's why I shifted to a Javascript framework for the front-end. Not only did it improve performance, it also enabled more client-side fancy features. Unfortunately, that just adds yet another several layers of complexity to the mix (and another language to learn).
I think my main personal iffiness with web development is that my goal is generally to make code that others can easily follow and understand (and potentially expand). And contrary to coding Python, when it comes to JS, CSS or even HTML etc I don't feel confident that I know what is a "good practice" or even if such a thing truly exists in some cases.
As for performance, I'm not (at this time) quite as worried about web adding any more overhead than it already does; the Twisted+Django combination Evennia uses is quite optimized for this kind of thing. That said, as much non-game critical things should certainly be offloaded to the client side. We support optional graphics, video and music in the client for those so inclined, and that's of course not something we'd ever care to stream from the server.
@faraday said in Getting Young Blood Into MU*'ing:
@mietze said in Getting Young Blood Into MU*'ing:
That is super niche. It doesn't surprise me that people who find that lacking will lean more into other stuff. Or that people who do enjoy it also enjoy other things and will divide their time further because there's more options for pastimes.
I don't see any evidence that it has to remain "super niche" though. People who enjoy video games will sit down and play them for hours on end, so we know there are people with blocks of free time on their hands. MUDs are still pretty huge. Play by post forum sites boast thousands of members and hundreds of games, so we know there are people who enjoy text-based RP. Storium had almost 7000 backers, but if you follow the community you'll see common complaints about the slow pacing and games fizzling out because one person dropped out, things that MU's dynamic/revolving-door nature do help to address.
I find it impossible to believe that there aren't a decent number of potential MU players out there.
But to snag them, we need more approachable tech, better tutorials/welcome wagons, and people willing to bend a little to accommodate them in actual RP. It's the latter that I see as the biggest challenge.
I agree with this optimism. Whereas I don't expect MU*ing to ever be the "next big thing" again on the whole, I do think that technology alongside better practices can go a long way into tapping into a today unseen player base.
I also don't understand people's aversion to web clients. I can accept the reluctance if the web client doesn't have some/all the features they expect/need/love in their third-party client. But my impression from other threads is that some just don't want a web client, period - regardless of its features.
@Tehom said in Getting Young Blood Into MU*'ing:
@Griatch said in Getting Young Blood Into MU*'ing:
Could you elaborate on what you think should work differently (apart from adding a RESTful API as a new input in the first place)?
.
GriatchWhat I was more thinking about was the response rather than the request, if that makes sense. Evennia does support using input_funcs out of the box to call commands: but those commands do not currently have a generalized way set up to generate a response afaik, it assumes that the only meaningful output needs to take place in-game. If we're assuming that the text response is just one type of View, that's not necessarily the case - we want any sort of action to generate some sort of JSON response which we'd pass along to wherever. So what I was picturing was commands calling methods in objects that'd return some dict-like structure that could be converted to JSON for web responses, though you could do the same thing with commands directly as well.
The caller.msg
is the response. The msg
method works perfectly for use as a JSON response since it you can send multiple outputfuncs
through it at the same time - caller.msg(text=..., foo=..., prompt=..., help=...)
etc.
You are correct however that many of the default commands use not one single msg call but multiple. To truly make them suitable for a proper RESTful exchange, one would need to consolidate the commands func
methods into each only having one return before exiting.
I don't think this would be too hard, honestly. The use of multiple msg-calls is more a sign of laziness than anything. Rewriting commands so as to concatenate the result text (or whatever output) into a string/dict and then only return it once at the end of each Command.func
is only a matter of refactoring code. Which is not hard, just takes time to do for 90+ default commands.
Thinking more on it, the main issue with doing something like this comes in interactive commands. If you use a delay or have a prompt using the @interactive
decorator, the execution of the Command's func
method will pause mid-way and wait for the user to enter a reply/input before continuing. Something like that does not really seem suitable for a REST-based communication. REST requests are expected to run in isolation and not being dependent on what came before, after all. Any ideas?
.
Griatch