Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm working on a mud (multiplayer text game) engine and I would like developers to be able to write their game logic in any programming language. Does anyone know if other engines like this exist?

share|improve this question
    
Check out the DLR en.wikipedia.org/wiki/Dynamic_Language_Runtime It's not 'any language' but it does cover a lot. –  Vaughan Hilts Oct 30 '12 at 3:15
    
Have you checked out Haxe? It's a language/platform, not an engine. Not sure if it has any libs for multiplayer games. –  Nick Wiggill Oct 30 '12 at 4:44
7  
Every developer uses a different programming language? Sounds like a recipe for disaster to me. –  Philipp Oct 30 '12 at 8:45
    
I was very temped to answer this question with "Yes, someone knows if other engines like this exist." Is that really the question you wanted an answer to? Or did you want guidance on how to implement the feature? Or were you asking for a list of engines which already do what you are doing, just for the sake of interest? –  Trevor Powell Oct 30 '12 at 11:29
    
I'm looking for a list of engines, to see their implementation strategies. My initial design is basically like your answer below, but further research wouldn't hurt. –  georgek Oct 30 '12 at 15:23
show 2 more comments

3 Answers

MUDs typically have a text interface accessible via a simple TCP stream.

Developers who wish to write game logic in arbitrary languages could simply have their programs interface with the MUD back-end via that text interface. Let them log into pseudo-characters and send text commands to the back-end, and receive results across that existing interface.

This approach would work for any language which supports opening a TCP network connection, and the engine then doesn't have to care at all about what language individual developers use, since it's interacting with them across a generic text interface.

share|improve this answer
    
This answer doesn't address the question in the OP (what games work like this?) but I'm voting it up because it answers the much more useful question of how –  jhocking Oct 30 '12 at 12:10
    
I feel that it's important to establish whether this has been done before. It seems unlikely to me that this idea is completely new, hence the question. If it's never beeen done perhaps there was a very good reason, perhaps performance, or the drawbacks simply outweighed the advantages. You can learn these things from concrete implementations in a way you can't from hypothetical ones. –  georgek Oct 30 '12 at 15:29
    
@georgek: Obviously it's been done before; IRC bots use exactly this method. Also obviously, there's nothing to learn from the concrete implementations as far as engine design goes. From the engine's point of view, those are just another set of (possibly specially privileged or restricted as far as some commands go, but you need this system anyway to distinguish between normal users, guests and admins at the very least) users. –  Martin Sojka Oct 31 '12 at 11:54
add comment

There is - and can't be - a system which accepts any language. After all, to achieve that goal, somebody would have to add compilers or interpreters for languages like Piet or Befunge. While this is certainly possible for any given language, it's not possible for all of them - while you're implementing them, somebody will just invent a bunch of new ones.

That said, there are common virtual machines which already have compilers for a lot of languages each. All you have to do is to build the engine around those VMs. The three most commonly encountered are:

  • LLVM (C, C++, Ada, Fortran, D, Objective-C, Haskell, ...)
  • JVM (Java, Erjang, Rhino, Quercus, Jython, NetRexx, JRuby, Jacl, ...)
  • CLR (C#, VB.Net, F#, J#, Axum, A#, Boo, Cobra, M, Oxygene, IronScheme, IronPython, IronRuby, Phalanger, P#, Scala, ...)
share|improve this answer
    
I'm currently using the JVM, and while things like JRuby, JPython, etcetera make it an attractive idea to just go with that, I'm seeking a more general solution. –  georgek Oct 30 '12 at 15:27
add comment

Short answer: No there is no mud-engine that accepts any language.

There is probably nothing at all that accepts 'ALL' languages (except for the keyboard and still I'm not sure).

That said, I'd suggest that you make the core (the engine) in whatever language you want and then offer bindings to the most common languages used, for example:

  • Lua
  • Python
  • Java
  • javascript
  • C/C++

Those are either scripting languages with big communities around them or languages that are used by a lot of programmers.

I'd just go for Lua though (or another well known scripting language) for starters and add other ones as per request when the API and the engine is ready.

share|improve this answer
    
What are you basing the assessment on that there are no mud engines or probably any engine that works like this? –  georgek Oct 30 '12 at 15:25
1  
Well, Martin Sojka sums it up nicely, you just can't do it, there are thousands of programming languages out there, some that even need their special hardware. The closest you can get is answered by Trevor Powell (IMO, +1 to them anyway), use a standard 'pass through' system (ie. TCP/IP). Your question is actually a bit weird, like why ever would you like to know if there has been a mud-engine with 8086 assembler support... But please elaborate if the question is important to you :-) –  Valmond Oct 30 '12 at 15:49
    
It's not the specific languages I'm interested in, but the general concept. I agree Trevor Powell hits closest to the mark so far. –  georgek Oct 30 '12 at 15:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.