[DGD] DGD & Simulations

Noah Gibbs angelbob at monkeyspeak.com
Tue Jan 28 18:36:34 CET 2003


On Tue, 28 Jan 2003, Christopher Darque wrote:

> I am new to this list and have spent a bit of time reading the old
> archives to start to get up to speed on this interesting new code.

  My God!  Somebody else that reads the archives.  Welcome, fellow
freak.  If you see any good stuff in there that I haven't already
summarized on my page, feel free to suggest adding it :-)

> In the same way I create landscapes that are heavy on the ASCII Art
> and light on text. If you generate the ground, a sky, and a layer of
> visible objects (buildings, trees, etc) via a code-based process on
> the fly you can then alter it based on things that happen in the
> area.
> Fires can destroy the grass, trees can burn down, or a new house can
> appear on what was once an empty lot.

  DGD definitely has some compelling features for you, then.  Particularly
if you want other wizards to be able to submit code, or if you feel that
your own may not always be perfect the first time :-)

> I realize that these sorts of things are not what even an advanced
> codebase like DGD was designed for, but I do this for fun and so
> sticking with a form of LPC is what I have always enjoyed.

  Actually, DGD is a fine design for this.  The ability to precompile DGD
to C code helps the speed, and the rlimits() construct keeps you from
hanging the game with long/complex operations by accident.

> 1) How does the disk-based design work with objects that are active
> and have to do things now and then?

  I've never had a problem with DGD doing this in a way I
noticed.  However, if you're worried about latency (rather than total
time) there are some things you could do.  The equivalent of making a mob
step back and forth would probably be repeatedly calling an empty function
(something like "void dont_swap(void)"), which keeps the room from ever
swapping out.  You can also configure how many objects DGD keeps in
RAM.  Set it high and you'll find that important/active objects never
leave memory.

> 2) Since I use a lot of ASCII graphics the style and efficiency of
> the code becomes very important. I am familiar with some of the
> packages that have been suggested here but I was wondering if anyone
> has done any specific work with ASCII that I might learn something
> from looking at.

  Not directly.  Chances are good that you'll want to use a binary port
instead of a telnet port for this stuff.  But the combination of
precompiled code and large string operations is probably your friend here.
  Alternately, you could extend the DGD server you use with custom
functions to do what you want, which is the fastest way.  Don't do this
unless you're *sure* it's not already fast enough, though.  If you do that
it'll make your code very hard to maintain, and modern computers will
usually run out of bandwidth before they run out of CPU when you're
running a MUD.
  Yes, even with the stuff you're talking about :-)

-- 
angelbob at monkeyspeak.com
See my page of DGD documentation at
"http://phantasmal.sourceforge.net/DGD/"
If you post to the DGD list, you may see yourself there!

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list