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 released a couple of codebases 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 spheretree datastructure which is released to the public domain.

A spheretree is a version of an R-Tree 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
Quote:
Originally Posted by
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.
Because spheres are more simple than rectangles.  You can give a rectangle a bouding sphere and cull off of that vice the bounding box.

Quote:
Originally Posted by
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.
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
Ughh... that's what happens when you're coding 3d transformations while posting . I meant vector magnitudes. Sorry, my bad.

Spheres are conceptually more simple, but calculating whether or not a point falls within a polygon is computationally simpler for a rectilinear shape than for a sphere. Using a rectilinear bounding box, you need to make, at most, 2n comparisons, where n = the dimensionality of the space you're working with. With a sphere, you need to find the root of the sum of n squares, plus a numerical comparison.
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

Hmm...the greatest...

Haven't achieved much of anything noteworthy, but a couple things I'm sort of proud of (all made in/for Circle 3):

* Online chess (between players, NOT against computer!
* Turn based combat with "combat grids" in which people fight
* Modified variant of "pets" that you can desc, name and control remotely and snoop, for IC purposes such as having servants that can take part in conversations elsewhere, run errands, etc
* Horse races with semi-graphical progress "bars" and betting system
* XML saving system


/F
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
Innovation is such a strong word.

I'm working on a from-scratch codebase designed around screen-control via the ncurses library. Working here is meant to mean, 'a week into', so I cannot say that's my greatest innovation in the past tense.

I wasn't the first to do it, but I'm very proud of my work with modern weapons. Guns, with ammo that ran out and had unique properties, explosives, land-mines, and tanks.

I don't know how to qualify 'great' but one very useful bit of code I wrote was the Static Reset Loader, a run-length encoded object survival system whereby objects in clan vaults, designated by room flags, would be written to file periodically by a fork()'d process and loaded on boot.

I wrote a signal handler for SIG_SEGV so that the game never actually crashed cold, but would hotboot on fatal error. Given the quality of my code at the time, that was very useful. (Debugging this was an experience too.)

Well, that's all that springs to mind. Interesting thread, by the way

Xanes -=- Lone Coder WinterMUTE
xanes is offline   Reply With Quote
Old 02-23-2003, 07:32 PM   #13
halkeye
New Member
 
halkeye's Avatar
 
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 Phantasmal MUDLib 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 12:45 PM.


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