[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Are bases procedural or OO written
Home  |  Users  |  Search  |  FAQ
Register forum user name
Forgotten password?

Are bases procedural or OO written

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Posted by Npp83   (16 posts)  [Biography] bio
Date Thu 20 May 2010 07:25 AM (UTC)
Ive been peering over the code in my SWFotE base, and really after having looked at it now with some programming knowledge, I see the code differently than I did before. So, in looking at it is a Diku derivative like SMAUG or what-have-you written procedurally or in an OO format. I really dont see any OO going on. Correct me if I am wrong.
[Go to top] top

Posted by Nick Gammon   Australia  (21,647 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Thu 20 May 2010 07:31 AM (UTC)
Smaug isn't particularly OO (it is pretty old). The MOO codebase is, hence its name.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Npp83   (16 posts)  [Biography] bio
Date Reply #2 on Thu 20 May 2010 07:45 AM (UTC)
Thats interesting. Thanks. Given the procedural nature of the code then, is there any method for gaining a better understanding of how the source is organized and related? The lot of the files all require mud.h but, for instance, what does mud.h contain that those files require. What I am looking for is a little organizational insight. Any thoughts or resources on how to start? Thanks again.
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #3 on Thu 20 May 2010 04:32 PM (UTC)
As I said in your crosspost over here:

I said:
Diku is only 'accidentally' object oriented in places, but this is neither enforced nor really encouraged. You can write OO code in C, it's just that Diku didn't. I don't think that you need polymorphism to be considered object oriented (although if you have it, it's a pretty clear indication of at least some OO design), but you do need a stronger conception of objects and public interfaces to those objects.

To answer your new question, mud.h contains the necessary prototypes for functions, a few declarations for global variables, and such things. There is not really a strict organizational scheme although the file names will give you a nominal idea of what is supposed to go in there. E.g., act_comm.c contains stuff related to communication actions; act_wiz.c contains stuff related to wizard (i.e., imm) actions.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum

[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]