comp.lang.ada
 help / color / mirror / Atom feed
* [request for advice] Please read, I can't come up with a short subj.
@ 1996-07-16  0:00 morphis
  1996-07-24  0:00 ` David Wheeler
  0 siblings, 1 reply; 3+ messages in thread
From: morphis @ 1996-07-16  0:00 UTC (permalink / raw)



Hi,
        Please bear with me, I will try to explain origin of the problem,
the problem itself and my capabilities.

        I have on occasion fell prey to MUDs (Multi-User Dungeons).  One
telnets in and interacts with game and with other users.  I have not been
satisfied with either the accuracy or various details of the way these have
been done.  So I decided to write one myself.  I hope to get a fairly
well intergrated alpha in about 2 years.

        One of the details to be dealt with is how to deal with objects
(chairs, tables, weapons, bodies, ...).  They will be kept track of via
object id #s.  I want to enumerate their
various properties (size, description, flamability...).  These properties
will sometimes be a number, sometimes text, sometimes a set of numbers.

        My problem is how to organize this in code.

        I am a system manager and have done a fair amount of programming.
(maybe a few thousand lines of code total, mostly in DCL)
I am not by any stretch of the imagination a hacker/guru/whatever.  I
have only the barest knowledge of object programming.

        I want to use this project to introduce myself to a few languages
probably Ada, C, C++ and PL/1. (ok so maybe it will take me 5 years
instead of 2...) object programing and to integrating different languages
in a single program.  (one reason for doing this is that I suspect I will
have other people writing significant parts of the MUD and they may not be
willing to learn ADA or whatever _I_ decide to write it in)

        At this embrionic stage I am looking for a reasonable naming
convention to use that stands a decent chance of making it into production.

        The brute force method I would use would be to make a
two dimensional array of characters :

object(oid,ci)="text"

where oid is the object id #, ci is the characteristic index # which is
mapped to a particular characteristic.  This is ok but keeping track of which
ci number refered to length and which to mass would be a pain, not to mention
having to parse through any characteristic that was an array.

Several years ago in a pascal program I saw a construct something like:

object.length(oid)
object.mass(oid)
...

I am completely ignorant of what this does.  But it looks like an
answer to my problem.  Does ADA have such a construct?  Does it have
any advantage over naming variables:

object_length(oid)
object_mass(oid)
...?

Any other ideas for a variable naming convention?
Suggestions for good books on object programming?
Other (printable-in-a-family-newspaper) suggestions?

Thanks for any help you can give me.

Robert
Morphis@physics.niu.edu




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [request for advice] Please read, I can't come up with a short subj.
  1996-07-16  0:00 [request for advice] Please read, I can't come up with a short subj morphis
@ 1996-07-24  0:00 ` David Wheeler
  1996-07-25  0:00   ` morphis
  0 siblings, 1 reply; 3+ messages in thread
From: David Wheeler @ 1996-07-24  0:00 UTC (permalink / raw)



morphis@niuhep.physics.niu.edu wrote:

...
:         I have on occasion fell prey to MUDs (Multi-User Dungeons).  One
: telnets in and interacts with game and with other users.  I have not been
: satisfied with either the accuracy or various details of the way these have
: been done.  So I decided to write one myself.  I hope to get a fairly
: well intergrated alpha in about 2 years.

I wish you well!  About a decade ago I maintained such programs
commercially, so I know what's involved.  Maybe the following will help.


You rightly suggested that storing properties by doing this:
: object(oid,ci)="text"
: where oid is the object id #, ci is the characteristic index # which is
: mapped to a particular characteristic.

is a terrible way to proceed.  Don't do it that way.

Nearly all programming languages (Ada, Java, Pascal, C, C++, etc.) have at
least some support for named components of records (structures), which
will do that automatically for you.


: Other (printable-in-a-family-newspaper) suggestions?

Yes.  If you're interested in creating a MUD, there are two different
approaches:

1. Start with someone else's MUD server.  These are programs specifically
designed to be a MUD.  Many have built-in programming languages and
systems for creating your own MUD.  The advantage: you don't have to
start from scratch.  The disadvantage: you have to do things, to some
extent, "their way".  One good server is LambdaMOO (MOO).

2. Build your own.  You'll need to know more than you know now.
That's not a bad thing - it will give you a reason to learn more.

I strongly recommend that you start by looking at other adventure game
implementations. By reading them, you'll learn about how different
people have solved similar problems.  See the MUD FAQ for more info.

You'll also need to learn about various computing constructs,
such as object-orientation.  I'd also recommend learning several
computer programming languages; learning several will help you to
think "outside the box" of the language you're using.

Try out my "Lovelace" tutorial, it culminates in a text adventure game.
The advantage is that you'd be able to see one approach to building such
a system, and it's small enough that you can easily understand the whole
thing.  It's single-player (not a MUD), but it could be easily turned
into a MUD.  Lovelace is at:
  "http://lglwww.epfl.ch/Ada/Tutorials/Lovelace/lovelace.htm"


: Robert
: Morphis@physics.niu.edu

--- David A. Wheeler
Net address: wheeler@ida.org





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [request for advice] Please read, I can't come up with a short subj.
  1996-07-24  0:00 ` David Wheeler
@ 1996-07-25  0:00   ` morphis
  0 siblings, 0 replies; 3+ messages in thread
From: morphis @ 1996-07-25  0:00 UTC (permalink / raw)



 wheeler@aphrodite.csed.ida.org (David Wheeler) writes:
>morphis@niuhep.physics.niu.edu wrote:
>
>....
>:         I have on occasion fell prey to MUDs (Multi-User Dungeons).  One
>: telnets in and interacts with game and with other users.  I have not been
>: satisfied with either the accuracy or various details of the way these have
>: been done.  So I decided to write one myself.  I hope to get a fairly
>: well intergrated alpha in about 2 years.
>
>I wish you well!  About a decade ago I maintained such programs
>commercially, so I know what's involved.  Maybe the following will help.

I want to thank the people who graciously offered me advice and
encouragement (most via email) (hamlink, deininger, nortonb, jrogers, dcw
and of course Wheeler)

>Try out my "Lovelace" tutorial, it culminates in a text adventure game.
>The advantage is that you'd be able to see one approach to building such
>a system, and it's small enough that you can easily understand the whole
>thing.  It's single-player (not a MUD), but it could be easily turned
>into a MUD.  Lovelace is at:
>  "http://lglwww.epfl.ch/Ada/Tutorials/Lovelace/lovelace.htm"

and to thank David for writing this tutorial.  IMHO it does a good job
of introducing the basics of Ada and OO programing.

>--- David A. Wheeler
>Net address: wheeler@ida.org

Robert
Morphis@physics.niu.edu




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-07-25  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-16  0:00 [request for advice] Please read, I can't come up with a short subj morphis
1996-07-24  0:00 ` David Wheeler
1996-07-25  0:00   ` morphis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox