[MUD-Dev] Python script as stand alone MUD server...
Byron Ellacott
bje at apnic.net
Fri Jan 30 10:56:57 CET 2004
On Wed, 2004-01-28 at 11:03, ceo wrote:
> :) Fair point. However, my understanding (from other games devs,
> not necessarily in MUD industry at all) was that Python was rarely
> usable in these kinds of cases without a fair amount of "something
> else" (usually C) for performance critical areas (nb: I realise
> I'm only presenting a rumour here, and I only say it because it
> seems a particuarly frequently described scenario. Perhaps the
> people who have to do this are bad/novice python devs, I make no
> judgement). This alters the WORA characteristics significantly,
> although on a good day with a following wind it's probably
> imperceptible.
It might be more beneficial to work the other way around, use Python
for, as someone else said, the scripting of objects within your
world. It's a convenient language for short tasks: rapid development
and good maintainability make it suitable. Given how easy it is to
embed such languages in C and C++ code, it can make sense to do so.
> But for some things where you might end up dropping to C, e.g. for
> asynch I/O, you're still seriously platform-dependent IIRC
> (e.g. availability of windows asynch libs on other
> platforms...?). That's perhaps a bad example; I'm fishing for
> better ones, or robust explanations of why I'm completely
> misguided :).
Python offers portable asynch I/O; see
http://www.nightmare.com/medusa/programming.html for a library built
on top of it. Python exposes a select() interface and a poll()
interface; poll() of course is less widely supported.
But once again, you can build your application in C, and deal with
portability via libraries such as glib, and add scripting support on
top of it, and get the best of both worlds.
--
bje, not speaking for my employer
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list