Category Archives: Programming

Building software.

New Editor Builds

For this build, version 0.59, the name has been changed from “Basternae Editor” to “ModernMUD Editor”. This is because I’m in the process of open-sourcing the codebase, and the editor will work not only for Basternae, but any MUD based on the same codebase.

Other than the name change, there are a few stability fixes, and probably some new bugs. Download links for Windows and OSX/Linux are on the right side of the blog. Enjoy!

The Magma Codebase Is Worth Millions!

I love how Ohloh estimates the value of open source projects. For instance, here’s their take on the Magma MUD codebase:

I believe Envy is just over 100k lines of code. At the average developer salary of $91,000/year, about $1 million in “value” was created by the Basternae II rebuild team. Value that, due to the DikuMUD license, could never actually be “claimed” through any means.

Just a curiosity, really, but still fun.

Sniktiorg’s Zones

Sniktiorg, one of the most creative and prolific zone creators in the world of MUDs, has granted Basternae 3 permission to use his areas. Woohoo!

I’ll attach them as I get them converted to the new format and figure out where in the world they should go.

Preserving Newlines in XML Serialization

With .NET’s XML serialization, it kills newlines when you serialize XML to disk. More specifically, it converts a CR+LF into just an LF (\r\n becomes just \n).

This was causing annoyances with the spell editor, since you can edit source code for spells with it, but the code would appear all on one line after saving and reloading.

The fix was to declare XmlWriterSettings with a newline preference.

The code was this:

         public void Save()
         {
             XmlSerializer serializer = new XmlSerializer(GetType());
             Stream stream = new FileStream(FileLocation.SpellDirectory + FileName,
                 FileMode.Create, FileAccess.Write, FileShare.None);
             serializer.Serialize(stream, this);
             stream.Close();
         } 

And now it’s this:

        public void Save()
        {
            XmlWriterSettings ws = new XmlWriterSettings();
            ws.NewLineHandling = NewLineHandling.Entitize;
            XmlSerializer serializer = new XmlSerializer(GetType());
            Stream stream = new FileStream(FileLocation.SpellDirectory + FileName,
                FileMode.Create, FileAccess.Write, FileShare.None);
            XmlWriter writer = XmlWriter.Create(stream, ws);
            serializer.Serialize(writer, this);
            stream.Close();
        }

I can have my newlines and eat them too. Oh joy!

I Am Addicted To Github

Until recently, the only code I’ve released as open source has been the Magma MUD codebase.

In the process of posting the Magma source on Github, I kind of got hooked on posting code online. Since then I’ve posted the source for a handful of applications, a mix of Linux and Windows desktop apps. A 12-day commit streak so far, yay!

I’m also considering open-sourcing the Basternae 3 codebase. The main things that make it easier to work with than old-timey C-based MUDs are the use of C#, which has amazing exception handling and debugging capabilities (no more attaching gdb to a core dump), and speaks XML natively, so data files are Human-readable, portable, fairly robust, and extensible. The editor is also getting to be pretty good.

To open source Bast3, I’d need to write a lot more documentation, and I’d need to “genericize” a lot of things that are specific to Basternae. It’d be a lot of work, but I think it’d be a fun project. The source is already in a private repository on Github, but that’s the easy part.

Magma MUD Codebase Now on Github

The Magma MUD codebase, last updated in 2008, is now on Github: https://github.com/Xangis/magma

I’ve cleaned up the build a little bit, but it’s still the same old Magma that was used to start Basternae 2, warts and all.

If you feel like cleaning up any bugs (there are plenty) or adding any improvements, go ahead.  If you want to send a pull request I’m Xangis on Github (as you can probably tell from the URL).

Using MonoDevelop

I’ve almost always used both Windows and Linux, but I stopped using Windows a few months ago.  One of the things that only runs on a Windows machine is Visual Studio.  The Basternae code was compiled on a Windows machine and then uploaded to the Linux host.

Without access to that, it was time to try using MonoDevelop.

MonoDevelop
It was able to load the Visual Studio solution, with some exceptions:  The client WPF project didn’t load, nor did the abandoned Silverlight project.  I could probably install more packages to make WPF work, I’m not sure yet.

I noticed that the compiler works differently for some things, like terminal characters.  The ECHO_ON and ECHO_OFF sequences broke logging in, but some weird prompt formatting that’s been around for a while just fixed itself.  It will be interesting to see what other diffferences turn up.  Even though C# is supposed to work the same on all platforms, I suspect that it might work better when both the build and run machines have the same operating system.

Client Version 0.24 Released

I’ve released version 0.24 of the Basternae Client.  Use the download link on the right side of the blog or on the basternae.org front page to get it.

This release mainly has cosmetic changes:

  • Changed the font for most things from Segoe UI to Verdana.  It just looks better.
  • Added “show group” and “show equipment” settings to the settings dialog so you can have those always show up when you start the client if you like.
  • Improved the look of the menu bar a little.
  • Reworked the settings dialog so it looks a little more organized.
  • Fixed a crash that would happen if you open and close the about box twice in a row.
  • Improved the layout of the status window.

There’s nothing groundbreaking or particularly complex about this release, it’s mainly just a small update to get me used to the code again, since I’ve been away from it for a while.

ANSI drawing and parsing glitches remain, and that’s the main thing that needs work right now.

Goodbye FindMUD

For a few years I ran findmud.com. It was mainly an exercise in customizing Drupal, but there was no real need for it. The Mud Connector filled the mud listing and community need quite nicely.

FindMUD is gone now. It was time that it was put out to pasture. It was fun while it lasted.

New Client Artwork From John Baker

John Baker, a friend of mine for a long while, did some work creating graphics tiles for me. It was intended for use in two old-style RPG projects I’m gradually working on. I’m sure you’ll hear about them later as they develop. Neat thing is, they were designed with both those projects and the Basternae client in mind.

Expect to see them in future posts and/or releases of the client. Stay tuned.

For now, check out his site:

argofjohnbaker.com

Multiverse MMO Engine

There’s a game engine designed for building massively multiplayer online games.  It’s called Multiverse.  It was originally a proprietary engine, but it went open source at the beginning of the year when the company that created it went out of business.

I played with it a bit back in 2010 before I left Ohio.  When I moved to California in the second half of 2010 I ended up working in the same building as Multiverse, Inc.  They were winding down the company when I arrived and I ended up buying one of their old computers, a monitor, and an office chair.  I met the founder, Bill Turpin, who also happened to work with the database admin where I was working when they were both at Netscape.

A while later they open sourced the project.  I didn’t have the spare attention cycles to dig into it for the first few months, but started tinkering with it again in April.  It’s a lot of fun to play with, but needs a lot of work, especially in the ease-of-use area.

I joined the development team and have been contributing the occasional bugfix.  To find out more visit this website:

www.multiversemmo.com

You Can Now MUD on webOS (TouchPad)

Much of my not-at-work development time has been spent on webOS lately.  The TouchPad and webOS version 3.x are great fun to work with and the only mobile devices that have APIs that don’t suck to develop for (I’ve worked with Android, iOS, and Win7 and none of them are fun from a C++ developer’s perspective).

Today my Telnet application was published in the catalog.  It’s still not perfect yet, but thanks to that application it’s now possible to MUD on the TouchPad.

Client Update: Now With Alias Support

I’ve pushed another update to the Basternae client today, version 0.23.  Download is available on the sidebar, as always.

Here’s what’s changed:

  • Alias support has been added.  Usage is #alias <keyword> <text that replaces the keyword>.  Aliases are saved when you click File -> Save Settings and loaded at startup.
  • Rendering of surface map sections with T-facing-right road pieces is fixed.
  • Fixed a glitch with closing and then reopening the status, group, equipment, hotkey, and map windows.
  • Improved the initial opening position of the equipment and group windows.

Give the client a try and let me know if and how aliases need to be improved (as in, what you typically do in WinTin or ZMud that doesn’t work here yet).  I used to use aliases, but I never did anything all that complex.  Typical aliases I used were “gc” = “get all corpse”, “ik” = “cast ‘ariek’ thri-kreen”, and the like.

Also note that the client doesn’t nag you about updates.  If you want an update you have to come here looking for it.

Win32 Visual Styles

Nothing to do with Basternae, this is just a reminder to myself how to enable the visual styles for controls available in Windows XP and newer in a WIN32 project in Visual Studio 2010.  Had to do this at work and it’s a little tough to look up.

1. Edit Project settings.
2. Under Linker->Manifest File edit “Additional Manifest Dependencies” and add:

type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*';%(AdditionalManifestDependencies)

Suddenly Win32 controls will stop looking like they’re from Windows 3.1.  The modern control styles were introduced in ComCtl32.dll version 6, and Windows apps use version 5 by default unless you tell them not to.

Map Improvements

It took a while, but I have the road tile changes done and in place.

In addition, the surface map shows markers for the following zones that were attached but didn’t have markers:

  • Autumnglen (Centaur Hometown)
  • Court of the Muse
  • Sarmiz’Duul
  • The Minotaur Stronghold
  • The Ice Tunnel Shaft

The client still has a few map rendering glitches that need to be cleared up — for instance, things get wonky if there’s a T-intersection with roads going north, south, and east on screen.

Client Improvements

Basternae Client version 0.22 is available now, with the following improvements:

  • All map tiles supported now. Anything before version 0.22 will look stupid on the overland map.
  • Better starting window positions — they don’t pile on top of each other now.
  • Hotkeys can be saved with File -> Save Settings.
  • You can control whether the hotkey window shows up on client startup and the number of buttons via the settings window. Be sure to save settings after you make changes for them to stick.

Since the hotkey window’s buttons are set to wrap, you can resize it to show buttons in any arrangement you like — 2×10, 4×4, 3×6, etc.

Check the right sidebar for a download link.