Saturday, July 19, 2008

Soulkeeper MUD Dev Pt4: Bug squishing + mobs

Found some more bugs today and fixed them. I don't know how I missed them in the first place! It pays not to ask someone why some code is crashing... 'Cause your a shit coder!' is the inevitable reply. I'd have to agree with that, after seeing some of the blindingly obvious bad pointers.

Anyway, after fixing those few bugs, I've moved on to some mob generation in the instances. I was originally going to let the builder of the instance create a list of mobs that could appear, but I've changed my mind. I've instead opted for a more automated approach. The builder creates as many mobiles as he/she wants, within the vnum range of the area, and the instance generation routines chooses the mobile automagically, based on the level (the instance is supposed to get harder the deeper you go). So instead the builder chooses a level range for possible mobiles for each particular room.

Also had a play with some MCCP routines, so that it shows total bytes/compressed bytes for each user at request.

Next job: deal with special mobs, including champions (extra hard), mini-boss, and instance-boss.

Soulkeeper Dev pt3 - System functions

Only myself to blame. I stayed up too late last night playing day of defeat, and slept in this morning. Mainly because Hannah (my daughter) was taken care of by my partner. I did get some coding in today, however... some much needed core code functionality. MCCP is a compression protocol, that saves bandwidth, and increases speed, and now it's functional within Soulkeeper. It was a hard slog, as I wanted to change all the send_to_char calls to mxp_to_char.. and as most Mud devs know, there are a lot of send_to_char calls. I'd like to thank Brian Graversen and Celestian for writing the original code. I would also like to put in threaded DNS resolution as well. I'll put it on the list.

It's all working now, which is sweet. I've got some fine tuning to the instance room generation before I go to bed.

Thursday, July 17, 2008

Soulkeeper MUD Dev pt2: Instances and wilderness

Continuing with the Diablo & World of Warcraft mud theme, the instance data structure has now been implemented and a few control procedures are in place to handle them. Someone can now select the instance they want to go to, then enter a portal and arrive at the newly created instance.

One big benefit of this, is that you or your group can complete an instance unhindered by other players, which can make for great boss / mini-boss encounters. One bug reared it's ugly head and refused to be squashed after much debugging. It was locking up the mud, and the process had to be killed. After a bit of banging my head on the desk, I found the cause.. a missing char_from_room() function, which was effectively duplicating a person and when they entered the room again, it encountered a clone and had a brain haemorrhage.

I've created one instance to test out the new functionality, the goblin caves, and it works surprisingly well. Builders will be able to create 'dungeon templates' that can be new instances. Basically set up the types of mobs that can appear, plus mini-bosses, champions, and the final instance boss (which every instance much have). These special types of mob have better chances of dropping rare loot.

I've also created the core city that will be the hub for adventurers, Gerris. This city has the portal fixture for instances, plus wilderness exits. I've also Added a few wiz commands to manage instances.

Soulkeeper MUD: Dev Pt1 - Creating the loot

This was something I wanted to implement first. Randomly generated items, with stats scaled based on how rare the item is.

I've got this working now, its pretty cool. Works pretty much the same way as in diablo 2. After you kill a mob, it has a chance to drop any type of item. That item can be normal, magic, rare, set or epic. Each rarity type has it's own color as well (white, blue, yellow, green, purple in the same order), as per diablo/world of warcraft.

The name of each item is also generated on the fly. Based on a large number of prefixes/armor types/postfixes. So you end up with objects like 'Glowing armband of the West', and so forth.

The stats are based on a combination of how rare the item is, and the level of the item.

Set items are an interesting beast. There are a number of predefined set items, but the definition only gives an affect the item is based on, like hitroll for example. The other affects added to the item are random. Also set items give pre-defined bonuses if you have more than one item in the set.

Tuesday, July 15, 2008

The plan

I had a number of different ideas for the original soulkeeper mud, but they never came to fruition, either because someone didn't agree with them, or I didn't have time. Now I control the direction and features of the mud, it can be what I originally envisioned. I'll go through each of the developments as I complete them, but as a summary, I'll list the major changes proposed (but not yet developed). The general theme is a diablo style mud, for a lot of replayability. A few features of World of warcraft (which I played for a while, but not anymore) are also in there.

Item Generation: All item drops from mobs will be random. The Items will be randomly created on the fly. Items have different types of rarity, just like Diablo/WoW. An item can be common, magic, rare, set or epic. More detail about this in the next post.

Areas/Room generation: This will be a combination of two types of areas. One area is an instanced dungeon, so you (and your group), have your own area without interference. The other is a wilderness area with randomly generated mobs, the number of which will be determined by how many players are in the area. More detail to follow.

Add critical damage events to combat: every damage hit has a chance to cause double damage.

Add MCCP support (compression protocol).

PvP Arena Battle leagues for different level ranges. Probably every 5 levels. Automated battle calls. Custom battle arenas.

Spell casting is no longer instant, there is a wait time for every spell, in which they can be interuppted so the spell takes longer. Spells do more damage in general.

New Classes / Skills. Max character level will be 50.

Features exist in the original codebase:
* Clans
* ANSI Color
* Auctions
* OLC (on-line creation)
* PvP arena battle system

The History

In the middle of 1995, I was playing a mud called mystic adventure. I hadn't been playing for long, before I heard this guy 'Fizban' asking for help coding his own MUD, called Darkworld. We chatted for a while, and I figured it would be good experience to help me learn some coding in C. I started coding simple functions similar to the ones in mystic adventure, but moved on to more complex ones and added bit by bit, changing the code base significantly.

Late 1995, the mud was becoming quite popular, with around 50 people on every day. It was at this time someone decided they didn't like the mud, and hacked into the server, deleting everything... the code base, area files, player files... Nothing was left. I was understandably disheartened after losing all my work, so I left the mud coding scene, finished Uni, and continued with my life.

In 2004, 8 years later, I got an email from Fizban. We got to talking about the good' ol days and how young whippersnappers weren't a patch on old geeks like ourselves. He also mentioned that he found an older backup of the mud code, and emailed it to me.

Modern day, Mon 19 May 2008 - Found the code in an archive where it has been sitting for the last 4 years. Based on the original mud 'dark world', which eventually became 'soulkeeper'. It is about to be ressurrected, with many many changes.