views:

234

answers:

4

Which do you think is the best language/framework to develop a text based adventure game like Mafia wars? I am proficient in Java/JavaScript and have dabbled in Python, Perl, Erlang, Scheme. Also, any pointers to articles relating to this is very welcome. I am starting from scratch and hence have no constraints. This is a hobby project that I am planning to do to satisfy my coding urge.

+2  A: 

The 'best' language doesn't exist.

Try using the one that you feel most comfortable with, after thinking about date structures, functional requirements, possibly the one where you can get the most support in your immediate (person to person) or close (e.g. stackoverflow) environment.

lexu
Thanks for that. I understand that there is no best language but say I am developing a GUI then I would like to go with an event based programming model rather than say Java Swing even though I am pretty proficient in Java.
Jean
A text based adventure requires so little GUI, that the GUI could even be coded in xxxx. Maybe I've missunderstood the reference to GUI? IMHO A textadventure requires easy access to (multi-line) descriptions, a good/flexible parser and well thought our data structures .. most any programming language will do!
lexu
GUI thing was just an example to give you the context of the question.
Jean
A: 

Just use what you have learn, there no specific programming language to do that kind of application. Just it's more or less easy depending the language

Since you seems to be experienced in Python just go ahead with python! If you don't already made some web project, you should take a look at tutorials and resources on the web.

Good luck!

RageZ
+1  A: 

I'm going to try something original here - give Natural language a try.

Inform is a tool for creating interactive fiction (a.k.a. text-based adventures) that features its own language. It takes care of creating the initial "infrastructure" (taking user input, recognizing verbs, that sort of thing) and lets you concentrate on creating "things", "places" and "actions".

Here's a sample, extracted from its tutorial:

The wood-slatted crate is in the Gazebo. The crate is a container.

Mr Jones wears a top hat. The crate contains a croquet mallet.

It looks deceitfully easy, I know. But try it :)

Inform also allows you publish it on The Interactive Fiction Database, as well as export it to a standard Z-machine format (I belive the file extension for this is .z8) .There's even a javascript z-machine interpreter, in case you prefer to host your adventure on a web-page yourself.

Edit: I've found two additional "frameworks" - I don't know whether they use a programming language, or they are completely graphical, I don't use windows: Adrift and TADS 3

egarcia
The great thing about using a language designed for interactive fiction is it comes with a pre-built parser and world model. That's the hardest part, in a game of any complexity.These languages are also tailored to dealing with lots of special cases and one-off behavior. The class/instance paradigm breaks down when every object in your game has unique code - you'd end up with as many classes as instances. Some languages use prototype-based inheritance to make singletons easy (Inform 6, TADS). Inform 7 uses rulebooks -- kinda like aspect-oriented programming -- to separate code from objects.
Jesse McGrew
A: 

I'm a little confused by your requirements; Mafia Wars is a web game, correct? Text adventures, while they can be played on the web (see this article: http://kooneiform.wordpress.com/tag/if-interpreters/) are usually single-player games, a far cry from Mafia Wars.

I think you mean you want to create a PBBG or web game; based on your experience then I recommend a Python back-end with JavaScript on the client-side. One framework you could look into is the Google App Engine, which has Python support, and would be an excellently scalable solution.

Alternatively you can choose one of the many Python web frameworks available. If you'd like a simple place to start, I recommend web.py, which I've been trying out recently and quite like. I've found that combining Python and JavaScript/AJAX with web.py and something like jQuery is a very enjoyable and friction-free way to develop.

georgek