The Mud Connector

Author Topic: Using a MUD to teach programming  (Read 3920 times)

MickTheGreek

  • New to TMC
  • *
  • Posts: 2
    • View Profile
Using a MUD to teach programming
« on: July 25, 2017, 3:05 AM »
Way back in the day, I learned quite a lot about programming from working on a MUD. Standard programming classes back then for non-CS majors taught BASIC or maybe FORTRAN, so getting dropped into the pseudo-C of an LPMUD was akin to Moses finding the burning bush.

I have kids who are in love with Minecraft. Minecraft is great. Even a 5-year-old can play along in Minecraft. But the older kids are at the perfect age to introduce them to programming concepts. My first thought was, of course, teach them HTML. It's structured, yet forgiving, and they would have something pretty they could look at in the end. But HTML has been overtaken by events. Hardly anybody writes HTML. They write code that writes other code that writes HTML. May as well teach them how to write in TeX.

So then I thought about MUDs, and LPMUDs in particular, because that's what I learned on. It has several advantages as a teaching tool that I like:

1. Everything is discrete objects. You can build a room, or an object, or an item, etc., and these are all separate files that can nonetheless interact with each other.

2. There is no structural limit to the imagination. Any child that can write can type, and they can be as creative as they want so long as it's in ASCII text, no Photoshop or 3D modeling skills required. (Teaching concise creative writing is a nice side effect of teaching coding techniques.)

3. The LPMUD environment, thanks to Mud/FluffOS and good mudlibs, are stateless enough that they lend themselves nicely to ZFS snapshots to take the sting out of coding something so badly that it crashes the MUD.

4. LPC isn't really a language so much as a blurry facsimile of one. Most languages this side of LISP are the same, but LPC is so domain-specific that you are unlikely to expect the next language you learn to cater to your syntactic prejudices.

5. Kids can invite their friends to explore and play, and you can exercise iron control over who does or does not get in.

6. Broken code doesn't even work, but bad code creates teaching opportunities.

My first problem with this idea came when I thought about point 5. It's essentially impossible to invite people to join when you have to preface your invitation with, "so, first, let me proselytize the wonders of telnet." Kids get hand-me-down smartphones and tablets. (They'd get hand-me-down desktops/laptops, except the old desktop/laptop was so built-to-a-price and so laden with junkware that it's not useful.) One of the most interesting aspects of MUDs is the NLP of a text-based interface, and typing on a smartphone sucks twelve kinds of ass.

I'm a Web app kinda guy, so I looked into wrapping MUD output. As far as I can tell, all MUD output is dependent on telnet plus some extraneous BS that talks to telnet with sparkles.

Anyway, I went with Dead Souls. It was the closest LP mudlib to what I recall, and I think I can make it do what I want to accomplish.

Januz

  • New to TMC
  • *
  • Posts: 22
    • View Profile
Re: Using a MUD to teach programming
« Reply #1 on: July 25, 2017, 1:48 PM »
Sounds cool, and clearly your kids are lucky to have someone looking out for their future in this way. Best of luck!
"The surest way to corrupt a youth is to instruct him to hold in higher esteem those who think alike than those who think differently."
- Friedrich Nietzche

Caliel

  • New to TMC
  • *
  • Posts: 14
    • View Profile
Re: Using a MUD to teach programming
« Reply #2 on: July 27, 2017, 10:50 AM »
I've had a similar thought when it comes to using mud to teach programming.  In fact, I teach a college-level C++/Object Oriented course that I intend to use Muds to demonstrate practical application of programming while having fun.

I've also used deadsouls in the past, but found it too limiting as LPC code is.. well.. LPC.  I would rather my students learn a modern language that could be professionally beneficial.  So I set out to design a mud that is LPC like, but with the benefit of Lua scripting.  The mud driver has come quite a ways and has replicated at least 50% of what deadsouls has.. minus the documentation and example code.

In any event, I think the key to smart phone and tablets is an intelligent client that is proprietary to the mud.  Moreover, the client needs to quickly predict desired commands so you don't have to type in "open door" and "get arrow" manually. 

Through the development of my mud driver I added in an integrated webserver so game output/input can be delivered easily to/from a webpage via rest calls (json).  An alpha example of my web interface for mud code development was posted some months back in the advanced mud programming section.  A full game client could easily use the same mechanism.

Caliel

  • New to TMC
  • *
  • Posts: 14
    • View Profile
Re: Using a MUD to teach programming
« Reply #3 on: July 27, 2017, 11:12 AM »
I've had a similar thought when it comes to using mud to teach programming.  In fact, I teach a college-level C++/Object Oriented course that I intend to use Muds to demonstrate practical application of programming while having fun.

I've also used deadsouls in the past, but found it too limiting as LPC code is.. well.. LPC.  I would rather my students learn a modern language that could be professionally beneficial.  So I set out to design a mud that is LPC like, but with the benefit of Lua scripting.  The mud driver has come quite a ways and has replicated at least 50% of what deadsouls has.. minus the documentation and example code.

In any event, I think the key to smart phone and tablets is an intelligent client that is proprietary to the mud.  Moreover, the client needs to quickly predict desired commands so you don't have to type in "open door" and "get arrow" manually. 

Through the development of my mud driver I added in an integrated webserver so game output/input can be delivered easily to/from a webpage via rest calls (json).  An alpha example of my web interface for mud code development was posted some months back in the advanced mud programming section.  A full game client could easily use the same mechanism.

Web-based editor post I mentioned above:  http://www.mudconnect.com/SMF/index.php?topic=80779.0

prochat

  • New to TMC
  • *
  • Posts: 2
    • View Profile
Re: Using a MUD to teach programming
« Reply #4 on: May 12, 2018, 5:59 AM »
Did you get a look at mudlle ?
https://github.com/MUME

AdventuresWithJ

  • New to TMC
  • *
  • Posts: 11
    • View Profile
Re: Using a MUD to teach programming
« Reply #5 on: May 14, 2018, 9:18 PM »
I first got into MUDing in the late 1990s, first as a player, then a builder. My building skills sucked at the time (being in middleschool and having dial-up internet, who could blame me). I stuck to playing for many years.
 Fast forward to post-college, I got back into MUDing and discovered an awesome MUD. In the spirit of non-bias non-promoting... I won't name it, but I'm currently a player + a builder. I've learned so much about coding as a builder, for sure. What helps is having tutorial guides that I can go back to (I'm a visual learner), and just pour my time reading through the guides and instructionals. The current MUD that I play has a really detailed builder's tutorial, and I can attest to the fact that it's really helped me learn a lot more about coding, everything from basic gear/mobs, to missions (kind of like quests, but often one times with a more finite and valuable prize at the end) and everything in between. Cheers!

Centauri77

  • New to TMC
  • *
  • Posts: 39
    • View Profile
Re: Using a MUD to teach programming
« Reply #6 on: June 03, 2018, 5:55 PM »
I beleive MUDs and MOOs can be a great place to teach programming, and I am currently working on devices that allow players to be sandboxed without being full fledged programmers on the MOO - since MOO allows uploading text as code directly, All I have to do is a scan thru the array of lines of code to ensure they are not doing something they shouldnt, and as far as hurting other data or objects, this is handled by security and properties and permissions anyway.
Other MUDS have their own methods, but in general, I think a MUD is a good way to sandbox practice programming, and it gives you a way to see what the leaner is doing.