Sweet, sweet code optimization

Started by Fnord, August 12, 2006, 09:19:45 PM

This is in regards to Zygax's post. Congrats, you crazy coders. Even though we love the new features that we can actually get our hands on, it's some of that under the hood, behind the scenes optimization that increases overall playability. I'm curious, is 242,000 lines of code a lot or a little for a MUD of Arm's size? What all languages do we use besides C and JavaScript?

My name is Fnord, and I'm a geek.
Amor Fati

Dude, it's Xygax.
Yes. Read the thread if you want, or skip to page 7 and be dismissive.
-Reiloth

Words I repeat every time I start a post:
Quote from: Rathustra on June 23, 2016, 03:29:08 PM
Stop being shitty to each other.

Oh yeah, and total like gratz and kudos to the staff.

You guys rock!
Yes. Read the thread if you want, or skip to page 7 and be dismissive.
-Reiloth

Words I repeat every time I start a post:
Quote from: Rathustra on June 23, 2016, 03:29:08 PM
Stop being shitty to each other.

Quote from: "Malifaxis"Dude, it's Xygax.

Pardon my phonetic evilness!  :shock:
Amor Fati

242,000 lines of code isn't much considering how much of our code is really data disguised as code.  If we were wholly data-driven (ie., we had flexible systems that pulled their parameters and configurations from a database), we'd probably shrink to a tidy 100,000 or less.  That would be nice.

-- X

Quote from: "Xygax"If we were wholly data-driven (ie., we had flexible systems that pulled their parameters and configurations from a database), we'd probably shrink to a tidy 100,000 or less.  That would be nice.

And less crashing, lag and connectivity issues.
eel the wetness of her tongue that slides across my skin
the viruses crawl over me and feel for some way in

acid bath

Quote from: "EonBlueApocalypse"And less crashing, lag and connectivity issues.

Stability might indeed follow from having a smaller codebase, since less code usually means less bugs.  The other two issues have nothing to do with code-size (and in fact are essentially the -same- issue).  And, if you disregard the router issues we had a short time ago, ginka's connection and network performance has been pretty solid.

-- X

This makes sense.  I once played a MUD that dealt in almost solely in databases and had a fairly small number of lines for a pretty in-depth code.  It wasn't half as fleshed out as Armageddon (I haven't seen one even close, really, if you know it, I'd like to see it), but it in the years of playing it (including logged in as an immortal 24/7), I only saw it crash twice.

Not that Arm is instable, it's got a pretty impressive run, especially for the number of players on at peak hours.

Edit:  The game never lagged, either, so I figured it might've been somehow connected.
eel the wetness of her tongue that slides across my skin
the viruses crawl over me and feel for some way in

acid bath

Quote from: "Fnord"What all languages do we use besides C and JavaScript?

Missed this on my first reading, sorry.  Here's the answer:

The new pathing systems, some effects systems, a new in-game "command-line parser" and a couple of other things are implemented in the game engine in C++.  More things will be implemented in C++ in the future.  I wanted C++ for the pather, because I like making use of STL containers where possible.

Many of the scripts that add features like orderable NPCs, liquid sellers, etc. are implemented in either C (lines already counted in the previous sum), DMPL (Dan's MUD Programming Language, a custom "assembly-like" scripting language developed for Arm by Jhalavar) (about 33k lines of code), or JavaScript (about 61k lines of code).

As I said before, a number of our web-based tools and services are build upon Perl, PHP or (also already counted) C.  We don't use python or C# or really any other languages very much.  There is also a telnet-like MUD client written in Java on ginka somewhere, but I don't know much about it, personally.

-- X

Sweet, sweet, geeky goodness. Thanks Xygax.
Amor Fati