From: morphis@niuhep.physics.niu.edu
Subject: [request for advice] Please read, I can't come up with a short subj.
Date: 1996/07/16
Date: 1996-07-16T00:00:00+00:00 [thread overview]
Message-ID: <4sghhd$jha@corn.cso.niu.edu> (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
next reply other threads:[~1996-07-16 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-07-16 0:00 morphis [this message]
1996-07-24 0:00 ` [request for advice] Please read, I can't come up with a short subj David Wheeler
1996-07-25 0:00 ` morphis
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox