Author Topic: Driver interfacing  (Read 4625 times)

Offline AlexK

  • Acquaintance
  • *
  • Posts: 2
    • View Profile
Driver interfacing
« on: February 11, 2007, 10:53:00 PM »
First of all, a caveat.  I haven't spent any significant time doing MUD programming, although I have played them off and on many years ago.  I have a lot of experience in C, although it is pretty rusty.

I am interesting in building an external "monitor/controller" using the deal souls codebase.  The vision is that you would have a dungeon-master type person who would have a GUI program that would allow them to monitor what is going on in the MUD, as well as be able to step in and take actions, take over NPCs, etc.  I realize these things can be done in the MUD itself, but I think the information can be portrayed much more effectively in a GUI.

The idea I had was just adding some code to the driver to communicate via a socket to a monitoring program (C#).  I need to get into the driver code to see how hard this will be, but any pointers are welcome.  I also need to compile it under Windows.  Is that as simple as using gcc and cygwin?

Any other advice would be greatly appreciated.


Offline saquivor

  • BFF
  • ***
  • Posts: 110
    • View Profile
Re: Driver interfacing
« Reply #1 on: February 12, 2007, 02:18:17 PM »
I used msys and mingw to compile on Win32. I actually prefer this method to Cygwin, as setting up Cygwin is a time consuming operation even with broadband net access!

Whilst I have never attempted what you are asking, I am not sure if you could achieve what u wanted by manipulating the LPC code objects, rather than c code that controls the driver.

I did pass on what i know about compiling the mud on Win 32 to Cratylus, not sure if there is a document on how to compile it though. If you compile via cygwin then it will be fairly straight forward.

A tongue in cheek suggestion for you would be to convert the driver to c# so it compiles on Mono and native Windows Frameworks  :) Then you could control everything :)
« Last Edit: February 13, 2007, 01:46:39 AM by saquivor »

Offline sojan

  • Acquaintance
  • *
  • Posts: 35
    • View Profile
Re: Driver interfacing
« Reply #2 on: February 12, 2007, 05:21:06 PM »
I wouldn't even begin to bother doing this at the driver level mainly because the mudos driver is cantankerous at best and quite possibly nowhere as cleanly written as you might think thus making it really hard to interface with at that level - it's a stackmachine at it's core and writing your protocol to interface with it etc is highly likely to be far more trouble than it's worth.

However, since mudos supports sockets from within the LPC environment it wouldn't be that hard to modify the lib [which you'd have to do anyhow to allow the kind of object takeover you're talking about] and create a protocol to allow you to interface with the various functions you setup all from within the lib itself thus negating the need for any driver modifications.

In fact, once you have added these functions to the lib you would then be able to interact as the GM either from inside the mud or from outside it with the GUI depending on your preference.  Taking it a step furthur you could even use the lpc webserver and some funky pages to interact with the functions you've setup and then you could provide a GUI without even needing to write a custom app!

Basically at the end of the day this kind of thing is eminently possible from within LPC itself and is probably the more sensible place to implement it and doing so doesn't preclude having a GUI if you want one.

J

Offline AlexK

  • Acquaintance
  • *
  • Posts: 2
    • View Profile
Re: Driver interfacing
« Reply #3 on: February 15, 2007, 09:35:20 PM »
Thanks, Sojan.  That sounds much easier.  I didn't realize LPC supported sockets.

I did think about reimplementing a MUD driver in C#, but it really doesn't have a great capability to load code on the fly like LPC.  There have been a few efforts to do a MUD in C#, but they all seem abandoned.

Offline saquivor

  • BFF
  • ***
  • Posts: 110
    • View Profile
Re: Driver interfacing
« Reply #4 on: February 16, 2007, 05:55:07 AM »
There are several active c# muds. I actually work on one them. The main developers have been heavily influenced by LPC, as have I. I will not go into large amount of detail here as this site is dedicated to LPC. For more information/advice on c# and muds take a look at Wheelmud who knows one day there may even be an LPC.net that runs under  mono/framework :)

Offline quixadhal

  • BFF
  • ***
  • Posts: 642
    • View Profile
    • WileyMUD
Re: Driver interfacing
« Reply #5 on: October 13, 2007, 10:29:36 AM »
While nobody has (yet) made an lpc for .net, if you're looking for an lpc-like language to use, there is always pike (http://freshmeat.net/projects/pike/).  As I recall, it started life as the Lpc4 driver, and eventually dropped the "game" aspect to become an independent interpreter.  I believe it was also a full re-implementation (much like DGD), although I might be wrong there.

PS:  Is there any way to make a url in this board system which has the name shown, but the URL as the clickable link?  IMHO, it looks a bit ugly to have to say the thing you mean and then add the link afterwards.

Offline Tricky

  • BFF
  • ***
  • Posts: 189
  • I like what I code and I code what I like!
    • View Profile
Re: Driver interfacing
« Reply #6 on: October 14, 2007, 10:53:48 PM »
Indeed Pike is a re-write of LPC4 due to licensing reasons. The histroy of Pike can be found here.

As for how to make URL links show names...

Code: (URL as a name) [Select]
[url=http://link.url.com/link/path]Link name[/url]

Tricky