![]() |
#1 |
New Member
Join Date: Sep 2003
Posts: 6
![]() |
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++? Thanks. |
![]() |
![]() |
![]() |
#2 |
Member
|
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: [code] int damage() { return (1+(int) (10.0*rand()/(RAND_MAX+1.0))); } [/quote] 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. |
![]() |
![]() |
![]() |
#3 |
Member
|
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. |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Feb 2003
Location: Bay Area, CA, USA
Posts: 39
![]() |
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. |
![]() |
![]() |
![]() |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MUD Combat systems | Hadoryu | Advanced MUD Concepts | 156 | 08-21-2006 02:59 AM |
Do you like combat? | KaVir | Advertising for Players | 0 | 06-22-2006 04:00 AM |
New Combat Systems | Derk | Advanced MUD Concepts | 8 | 10-31-2003 10:52 AM |
non combat xp | Pris | Advanced MUD Concepts | 6 | 06-27-2003 03:53 AM |
Space Combat | Nerzule | Advertising for Players | 0 | 05-26-2002 01:12 PM |
|
|