Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 01-24-2003, 09:32 AM   #1
Terloch
Member
 
Join Date: Apr 2002
Location: Chicago, Illinois
Posts: 152
Terloch is on a distinguished road
The coding forum, sans the couple of questions that pop up on something, is pretty slow of late, so I'll throw out a question for all the coders out there...

What is your greatest code innovation that you've added to the code you run and/or the mudding community (if you've published it? Is it something behind the scnene to make things run faster, or something the players all can use and rave about because it's cool and unique?

No posting of things like a class, I'm looking for specific single instances of things...

Terl
Terloch is offline   Reply With Quote
Old 01-24-2003, 02:23 PM   #2
Yui Unifex
Senior Member
 
Join Date: Apr 2002
Location: Florida
Posts: 323
Yui Unifex is on a distinguished road
Send a message via ICQ to Yui Unifex Send a message via AIM to Yui Unifex
Question

I've to the public domain =). The potential users of my codebases aren't your average mud coder though, as most sections of the code are overengineered and the entire system requires a thorough knowledge of C++ and related programming principles to understand. Its primary goal (aside from my own entertainment ;)) is to be of use to those that wish to see how certain code designs play out in a working implementation. So it's only really of any utility to people concerned with these design issues, i.e. those that are writing codebases themselves.

Certain ideas I've been working on through the codebase are template systems for modifying the format and content of strings in the game, generic database layers, inheritance-driven client/server architecture, dynamic loading of compiled code, a one-type system for objects (not different types for things like inanimates, mobs, pcs, areas, etc.), traditional and spacial area systems, and little things here and there to increase maintainability and robustness =).
Yui Unifex is offline   Reply With Quote
Old 01-24-2003, 04:36 PM   #3
Eternal
New Member
 
Join Date: Dec 2002
Location: Sun Valley, ID
Posts: 28
Eternal is on a distinguished road
Send a message via AIM to Eternal
In coding for a privately-run Shadowrun MUD, I finally finished my greatest work about a year ago.  A simple perception code that checks against intelligence (using the Shadowrun system) whenever you look at someone.  It uses the "conceal" numbers from the books, and remembers what you can and cannot see (on a given individual) for an in-game day.

E.g. when a not-too-sharp person types 'look troll', they get:

The trolls description is here.
The troll is using:
<worn on body>A pleated, armored jacket
<worn on legs>A pair of leather pants
<worn on feet>A pair of army boots

This works even if the troll has hidden items under his jacket (the conceal code again).  Someone with better luck on their perception roll might see:

The trolls description is here.
The troll is using:
<worn on body>A pleated, armored jacket
<hidden>An Ares Predator II
<hidden>A hold-out pistol
<worn on legs>A pair of leather pants
<hidden>A NarcojectTM pistol
<worn on feet>A pair of army boots
<hidden>Many NarcojectTM darts

Thought it was pretty nifty... only took me about 2 weeks to work the bugs out, heh.
Eternal is offline   Reply With Quote
Old 01-28-2003, 08:54 PM   #4
visko
Member
 
Join Date: May 2002
Posts: 98
visko is on a distinguished road
Send a message via ICQ to visko Send a message via AIM to visko
Hey there,

My last thread showed a little bit of what I was doing, and I've now finished my "biggest accomplishment" to date...

It's a restructuring of OLC that should make builders much happier. Based on Ivan's OLC, it takes out the ability for immortals to add areas and assigns that to the implementor only, and then uses "segments", or logical segmenting of area files, to keep track of what zone is which.

This on the surface seems pretty pointless, but the added bonuses continue to pop up. Segments don't have predefined numbers of vnums to be used with them, so the builder can create anything they want and never have to worry about vnum holes (unused vnums within an area); the code takes care of looking up the last vnum used in the area, and the room/obj/mob is automatically assigned a number which correllates to the segment being added to.

Not only that, but in a one-area MUD with logical segmenting of the vnums, you can reset anything anywhere, so there's no more need to copy over the values of that cool sword or beefy ogre you saw in someone else's area; just reset it, and go.

I'm continuing to pursue this restructuring, looking for ways to make it better, and I'll be releasing my code base as a whole in probably 6 months give or take, and I'll be happy to give out a patch to the mud community at that point.

-Visko
visko is offline   Reply With Quote
Old 01-28-2003, 09:48 PM   #5
Teelf
Member
 
Join Date: Apr 2002
Location: Seattle
Posts: 32
Teelf is on a distinguished road
I coded a datastructure which is released to the public domain.

A spheretree is a version of an using spheres instead of rectangles. A spheretree is a data structure used for handling spatial data. For example, storing objects in a 3D coordinate system.  R-tree's are especially suited for dynamic insertion/deletion as well as for point data. And R-Tree's are well suited for MUD's in general if the MUD uses any type of "real" spatial representation (such as a 2d/3d coordinate system or grided room system).

I encourage any MUD wanting a roomless system to take a look!
Teelf is offline   Reply With Quote
Old 01-29-2003, 12:28 AM   #6
JilesDM
Member
 
Join Date: Nov 2002
Posts: 66
JilesDM is on a distinguished road
Just out of curiosity, why did you make a "spheretree" system? I can't think of a reason not to use R-trees because you need to use the rectilinear bounding box of the given polygon in order to do the initial culling efficiently. With a sphere-based system, you need to calculate a vector normal for every single test, which, I would think, would bog you down considerably.
JilesDM is offline   Reply With Quote
Old 01-29-2003, 01:01 AM   #7
Teelf
Member
 
Join Date: Apr 2002
Location: Seattle
Posts: 32
Teelf is on a distinguished road
Because spheres are more simple than rectangles.  You can give a rectangle a bouding sphere and cull off of that vice the bounding box.

I'm not sure what you mean.  Which normal are you refering to?
Teelf is offline   Reply With Quote
Old 01-29-2003, 01:48 AM   #8
JilesDM
Member
 
Join Date: Nov 2002
Posts: 66
JilesDM is on a distinguished road
JilesDM is offline   Reply With Quote
Old 01-29-2003, 02:19 AM   #9
Teelf
Member
 
Join Date: Apr 2002
Location: Seattle
Posts: 32
Teelf is on a distinguished road
Determining if a point intersects a sphere requires only one check.

[code] bool Sphere;;Intersects(const Vector& point)
{
float flSqrDist = SqrDistance(_vecCenter, point);
return (flSqrDist < (_flRad*_flRad));
}[/quote]

With SqrDistance returning the squared distance from the sphere's center to the point in question. And _flRad is the sphere's radius.

No square roots and only 1 check versus 6 for a rectangle.  Spheres are computationally cheaper than rectangles in almost any use.

NOTE: In case people are thinking this is about graphics, it's not.  This is all very applicable to text MUDs.
Teelf is offline   Reply With Quote
Old 01-29-2003, 02:38 AM   #10
JilesDM
Member
 
Join Date: Nov 2002
Posts: 66
JilesDM is on a distinguished road
Yes, but you're forgetting what SqrDistance() does. It does n subtractions, n multiplications, and finally n-1 additions, as opposed to simply 2n comparisons, where n is the dimensionality of the given space.
JilesDM is offline   Reply With Quote
Old 01-29-2003, 08:13 AM   #11
fredrik
New Member
 
Join Date: Jan 2003
Posts: 5
fredrik is on a distinguished road
Exclamation

fredrik is offline   Reply With Quote
Old 02-22-2003, 09:22 PM   #12
xanes
New Member
 
Join Date: Feb 2003
Posts: 29
xanes is on a distinguished road
xanes is offline   Reply With Quote
Old 02-23-2003, 07:32 PM   #13
halkeye
New Member
 
Join Date: Jan 2003
Name: Gavin
Location: Vancouver, Canada
Posts: 12
halkeye is on a distinguished road
Send a message via ICQ to halkeye Send a message via AIM to halkeye Send a message via MSN to halkeye
I think some of my greatist innovations for my old mud was when i got sorta semi-annoyed at players and became a sadisitic coder..

So i started to make things like stds and breaking of bones, which impared movement as well as abilitiy to do skills and such.

yea..
halkeye is offline   Reply With Quote
Old 02-26-2003, 07:58 PM   #14
angelbob
Member
 
Join Date: Feb 2003
Location: Bay Area, CA, USA
Posts: 39
angelbob is on a distinguished road
I'm the author of the for DGD. So that's probably my greatest contribution to MUDding. Within that, probably the UNQ save/load system including DTDs. It's kinda like XML, but different.
angelbob is offline   Reply With Quote
Reply


Thread Tools


Your "greatest" code innovation... - Similar Threads
Thread Thread Starter Forum Replies Last Post
um..how do I code? Asalyt MUD Coding 12 05-26-2004 05:03 AM
Where do you value progressive innovation most? Burr Tavern of the Blue Hand 14 05-09-2003 10:38 PM
Avathar = Greatest Mud KnightFall Tavern of the Blue Hand 2 07-08-2002 05:04 PM
Avathar = Greatest Mud KnightFall Advertising for Players 0 07-08-2002 01:43 PM
I would like to code! Zellius Advertising for Staff 1 07-03-2002 08:59 AM

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 01:22 PM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022