[MUD-Dev] [TECH] Multi - Browser plugin framework

Edward Glowacki glowack2 at gmail.com
Thu Sep 29 15:13:58 CEST 2005

On 9/28/05, Arnau Josep Rossell=F3 Castell=F3 <arossello at atmsa.org> wrote:

> I've also looked at AJAX briefly, but it looks too limiting and
> hackish, it could be useful as a complement to plug-ins(more
> below), but it's not enough on its own.

> (Also, It would be nicer if i didn't have to learn the whole
> Javascript, css, etc thing; I'm wondering if there isn't anything
> that let's me construct basic things like changing lines of text
> from the server without reloading the page, but abstracting for me
> the messy client side?)

This is possible to do with AJAX, and there are libraries out there
that will help you do it.  Prototype.js
(http://prototype.conio.net/) is one such library.  Basically it
ends up being a single line on the client side to replace an
arbitrary block of data:

  X =3D new Ajax.Updater("container",url);

where container is the ID of the element that you want to replace
(such as <div id=3D"container">), and url is the URL to fetch the
replacement content from (such as
/update?action=3DgetRoomDescription&room=3D27).  The output from the
URL would need to be a page fragment that gets stuck between the
<div> and </div> tags (which the Ajax.Updater does for you).

You'll probably still want to know about CSS and javascript and such
to do your appearance, layout, and dynamic behaviors to make a
smoother interface.

> I'm looking now at simply making downloadable plugins, Which will
> give me 2 or 3 standard output contexts(SDL for 2d input and
> audio, Opengl, and text), control over what is cached locally, and
> the ability to embed a Python interpreter.

That's a pretty heavyweight plugin... =3D) It seems to me that with
the quantity of stuff you are trying to do, you've gone beyond the
realm of "web interface" (OpenGL+python interpreter >> web) and I'm
not sure there's necessarily any reason to stick within the
limitations of a web browser anymore.  Also, do you really want to
spend all your time making browser plugins, or would you rather put
that time into making your game?  I know which one I would
choose... ;)

> The question now: :P

> Does anybody know of a framework that has at least some of the
> following?

>   - Works on IE and Firefox (old netscape, opera, the MacOS
>   browser thing, whose name eludes me, etc... would also be nice)

Safari is the name you're grasping for. =3D) And as far as "old
netscape" goes, I don't think I would personally target that as a
platform for anything anymore unless there is a dire need to.
Running on old hardware is one such need, but considering the amount
of stuff your application is going to do with 3d/2d/sound/python,
it's not going to run on ancient hardware anyway, so you might as
well set your target for something reasonable.

>   - Let's me tie it to SDL so I can have a widget on the page that
>   is a SDL 2D or OpenGL context.

>   - It's reasonably portable, I'd like to offer a simple installer
>   for every plataform.

>   - Works in C/C++(so I can easily embed a python interpreter)

> Thanks in advance for the help(advice in other directions is good,
> too!)

I don't know how many of your requirements it meets (it may not be
enough), but there is Flash to consider if you're still thinking
"run in a browser".  Java applets are the other thing that comes to
mind, but you already mentioned you're not too excited about that

My recommendation is either scale your application to fit reasonably
within something that can be browser-deployed (be it straight HTML,
HTML+javascript(+AJAX), Flash, or something), or scale your
deployment to fit reasonably with what you want out of your
application, and don't spend all your time trying to force the
technology when you could be spending that time making your game.

MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the mud-dev-archive mailing list