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

Thread Tools
Old 11-06-2003, 02:45 PM   #1
New Member
Join Date: Sep 2003
Posts: 6
Blade is on a distinguished road
I am starting to try to build my own mud using Melville mudlib and DGD. I have to basically code everything from scratch, but the actual base part of the mud is runnable already. Now I just need to implament all the stuff in it.

Anyways... my question is: Is it really hard to make a combat/magic/skill system. I myself don't know how to program yet, but a friend of mine does a little. I think he knows enough. Can anyone direct me to some source code that would give an example of a combat system in C or C++?
Blade is offline   Reply With Quote
Old 11-06-2003, 04:11 PM   #2
Join Date: Apr 2002
Location: Canada
Posts: 50
Koryon is on a distinguished road
Send a message via ICQ to Koryon Send a message via MSN to Koryon
If you're friend needs examples of stuff, he probably isn't good enough to tackle the massive task of building a combat system, and skills, and spells.

Of course:

int damage()
return (1+(int) (10.0*rand()/(RAND_MAX+1.0)));

Could be called an example of a combat system, but I think you're looking for something a *little* more complicated?

Looking at an example is not they way to do that, that one begins with a pencil, a piece of paper, a lot of caffeine and a lot of free time.
Koryon is offline   Reply With Quote
Old 11-07-2003, 06:50 AM   #3
Join Date: Apr 2002
Location: Switzerland
Posts: 120
Alastair is on a distinguished road
Send a message via Yahoo to Alastair
While I'm not familliar with Melville, nor even DGD-specifics, two things:

- C / C++ combat systems ought to have an example value in the more distant sense only for what you need. Especially things like the temporal flow of combat is highly dependent on how your codebase is being built, and LPC, being interpreted, tends to implement things a bit differently than a compiled MUD.
- You'll probably want to have a look at the combat modules from other mudlibs instead as they ought to be closer to what you need.

In practice, combat flow usually involves making the necessary amount of targets aggro at each other, determining the order of attack, the chance to hit, evasion / dodging, applying damage vs. armor / resistance then against health, checking the target for death / incapacitation, applying potential counters, then advancing to the next target in time order. Whether you'll add "special" damage like additional spell damage on weapons and their resistances is up to you, and you'll also want to determine at what point the player can interrupt actions to use skills and spells, and what the indirect consequences of such interruptions are, if any (if spell casting is a lengthy affair, what happens to the opponent's attack? Is the caster helpless? for how long? etc).

Beyond those considerations, your coder (and you) will have to decide whether the combat system will be based on call_out or on heart_beat, which might influence the pace of the whole thing - and depends on how well DGD manages either in short time intervalls (although the best choice _seems_ to be heart_beat by default, this isn't always the case).

From your post, hoewer, it looks like neither you nor your coder are really at ease with the tasks at hand. Coding a mudlib isn't exactly easy to get into, I would only advise you to either realize you're in this enterprise for the very long term, or try to get both of you hired as staff on an established MUD for a couple of months to learn the ropes from experienced people.
Alastair is offline   Reply With Quote
Old 11-07-2003, 09:03 PM   #4
Join Date: Feb 2003
Location: Bay Area, CA, USA
Posts: 39
angelbob is on a distinguished road
Heya! I *am* pretty familiar with DGD, LPC and Melville. That's mainly because I'm the author of the Phantasmal MUDLib for DGD :-)

DGD supports call_out but not heart_beat by default, but it's easy enough to build a heart_beat facility. Phantasmal uses a Daemon for that, or you could do it in your AUTO or DRIVER objects (the objects in your mudlib that interface directly with DGD).

Building a simple combat system isn't too bad. You could look at the 2.4.5 mudlib for DGD, which has a combat system and a heart_beat. But an interesting combat system, especially with magic and spells, is harder and requires a lot of design. If you've never done it before and haven't done a *lot* of reading, expect serious problems.
angelbob is offline   Reply With Quote

Thread Tools

Combat system - Similar Threads
Thread Thread Starter Forum Replies Last Post
MUD Combat systems Hadoryu Advanced MUD Concepts 156 08-21-2006 03:59 AM
Do you like combat? KaVir Advertising for Players 0 06-22-2006 05:00 AM
New Combat Systems Derk Advanced MUD Concepts 8 10-31-2003 11:52 AM
non combat xp Pris Advanced MUD Concepts 6 06-27-2003 04:53 AM
Space Combat Nerzule Advertising for Players 0 05-26-2002 02:12 PM

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 05:59 AM.

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