29 Sep, 2015, mikesmoniker wrote in the 1st comment:
Votes: 0
I am posting this here but my question is rooted in Dikurivatives like Merc and ROM.

In most such codebases, input is polled and ultimately things like combat rounds are handled in the order that characters appear on a list (usually a linked list) of connected sockets. So for example, if I'm the last person to connect to the MUD my combat "rounds" (e.g., via a function like violence_update) get handled before my opponents and therefore I have an advantage. For the same reasons, it's possible for things like deliberate game lag (e.g., from skills or spells) to favor one player over another. Most MUDs (including mine) don't have a system of discrete "battles" like you might in a turn-based game, and instead the game simply loops through every player and sees who they are hitting and that's that, otherwise I could see that solving the problem for combat at least.

I can think of some ways of working around this like randomizing the socket/character list every so often, but that seems like it would have some overhead and is just plain not elegant.

So, if your MUD doesn't work as described, how does it work? Do you have any suggestions for making the game more "fair" from a PvP perspective?
30 Sep, 2015, plamzi wrote in the 2nd comment:
Votes: 0
This has been discussed fairly recently. May be easier to google for the topic nowadays.

Randomizing the list, I feel, would be less elegant than having a double linked list that you can traverse one forward, once reverse.

Another classical solution is to to timestamp command input, but it'll add more overhead.

Probably the most efficient approach is to have a global command queue (or at least a combat cmd queue) from which different 'timers' read their commands in the order they were received. The downside is it calls for significant modifications.

Most event-based codebases don't have to worry about this. Last time, I recall, some people also had examples of specific solutions for Dikurivatives. I personally never felt those solutions were worth the bother for my Diku game since it's not PK-centered.
30 Sep, 2015, Idealiad wrote in the 3rd comment:
Votes: 0
Can someone educate me on the Diku loop, because naively I'm thinking if you have a list of PCs like

(A, B, C)

Then A always goes first. But if A attacks B, then B will get its counterattack. Combat proceeds, but the only reason A goes 'first' is because they attacked first, which seems fair to me. Sure it's an advantage to 'go first', but again, they attacked first.

If B attacks A, then A also will get its counterattack and combat proceeds normally.

What am I missing here?
30 Sep, 2015, Rarva.Riendf wrote in the 4th comment:
Votes: 0
>What am I missing here?

Some attack skills put you on the ground like bash/trip whatever.
If someone is always first and has a physical advantage that makes him never miss..you get the point.
Unless the command makes him lag t least one round, you basically made your opponent impossible to use any other command than stand.
Off course you may call that a deisgn flaw in the command system itself.
But there are not much workaround about it.

Btw, I did discuss this as well :) (but I did not randomized my list yet, nor reversed it…)
I am still thinking of changing the order on some parameters the player actually has a little control over (like not using skills/spells, or only 'fast to use' skills etc. O use moves as well (a tired player will act more slowly hence always second)
so many parameter to use, but have not come with a formula that actually please me yet.
Not that I have players that care anyway :)


Something you may ant to check as wll as most diku are flawed since they use basic snippet: with groups
depeding on logging order a player can have two round of attacks.
ie: a player attack first, the player automatically counterattack, as the other player grouped with them. then come their turn to attack in the list (if they logged later): they are in fight: they get another round at it!
02 Oct, 2015, quixadhal wrote in the 5th comment:
Votes: 0
If your combat system lets somebody "win" just by having the best initiative, your combat system is broken.

The situation you describe assumes all players are 100% equal to each other (which should NEVER happen), and that they will always use the exact same abilities (which should ALSO never happen).

In reality, Diku combat relies on an auto attack + various skills or spells that impose a WAIT_STATE mechanic. When stuck in a WAIT_STATE, you can't do anything else but auto-attack. So… if I get an alpha strike on you using an ability, at most I get that plus an extra attack on you, and you get N ticks to respond with your own skills before I can do anything BUT auto-attack.

This includes evasive skills like fleeing, dodging, etc.

The DikuMUD combat system, as it was shipped, works fine. The problems come when apparently teenage implementors start adding unbalanced abilities that let people one-shot other people, or are overpowered in other ways. Those abilities should be balanced properly so they can be countered. If it's an issue of level difference, perhaps you shouldn't be allowing combat between people who are too far apart, or perhaps your combat shouldn't be so heavily rooted in numbers derived from level.
03 Oct, 2015, Rarva.Riendf wrote in the 6th comment:
Votes: 0
>The DikuMUD combat system, as it was shipped, works fine.

No.

> Those abilities should be balanced properly so they can be countered.

Off course, easier said than done though. Even high budget games with full testing teams have a hard time doing it….You are not dealing with a few combo there…wanting some skills to always be conterable is also pretty much childish.
Bashing physically weak people is..normal. Sure there are spell to weak down people, but if you are yourself bashed all the time it makes sense that you cannot use them. Basically having initiative is the key..but when you do not have it, jsute because you logged after another char, it becomes a useless skill/spell. (hence why the Diku fiht system is broken by design)

> If it's an issue of level difference,

level stats whatever, at one point you will have a formula that rely on number.
I usually add some randomness though, so a skill does not automatically ork anyway. Sometimes though, you have to make a choice:
I state your own words

>The situation you describe assumes all players are 100% equal to each other (which should NEVER happen)

Well then you can assume some people are totally overwhelmed by other power…but not being able to flee because you logged second instead of first ? Broken by design;
03 Oct, 2015, plamzi wrote in the 7th comment:
Votes: 0
Rarva.Riendf said:
>The DikuMUD combat system, as it was shipped, works fine.

No.


I agree. There are obvious issues with bash and backstab, and there are others. This is why many novice / enthusiast coders often have a hard time and some start threads like this one. But I also agree with quix that the root cause is dis-balance and not how people's turns get evaluated exactly. The implementation of combat in vanilla Diku is OK, not great. It's just not ready for prime time of the box. That's more true for PvP than PvE, which is passable.

Rarva.Riendf said:
>
> Those abilities should be balanced properly so they can be countered.

Sure there are spell to weak down people, but if you are yourself bashed all the time it makes sense that you cannot use them. Basically having initiative is the key..


Oooh. But it also "makes sense" that if you're flying and your opponent isn't, then they can't bash you (and that's not implemented in stock Diku, but could have been). Or if you can make yourself really large, or really small, or turn yourself to a mist temporarily, or create mirror images of yourself, or make yourself immovable as a rock… I think you get the point.

Having initiative may be the key in stock Diku turned into PvP overnight. It certainly doesn't have to be that way.

Rarva.Riendf said:
>
>The situation you describe assumes all players are 100% equal to each other (which should NEVER happen)

Well then you can assume some people are totally overwhelmed by other power…but not being able to flee because you logged second instead of first ? Broken by design;


Again, if the out-of-the-box design is broken, you have many tools at your disposal to fix it. Whether you start by balancing skills or by worrying how people's combat turns are evaluated doesn't matter much.

As an aside, I'm also wondering how much of this is a real problem in real PvP-heavy games and how much of it is players with cursory knowledge of the Diku code complaining that the way they lost was "unfair".
04 Oct, 2015, Rarva.Riendf wrote in the 8th comment:
Votes: 0
>But it also "makes sense" that if you're flying and your opponent isn't, then they can't bash you (and that's not implemented in stock Diku, but could have been).

Well, depends…(I did introduce something like that though :) flying is indeed a parameter i use for any bashing skill.

>Or if you can make yourself really large, or really small, or turn yourself to a mist temporarily, or create mirror images of yourself, or make yourself immovable as a rockā€¦ I think you get the point.

Yep, basically especially since…I actually do use everything you are saying either as parameter for bash or physical attacks :)

>Having initiative may be the key in stock Diku turned into PvP overnight. It certainly doesn't have to be that way.

Nope, But that is why I say that default Diku combat system is broken. But still, logging in a perticular order should give NO benefit or drawback to any player.

> I'm also wondering how much of this is a real problem in real PvP-heavy games

It is a perticulary annoying one. As a player I hate it.

I could not care less about it when killing mobiles though…mobiles are not interesting to begin with.
06 Oct, 2015, quixadhal wrote in the 9th comment:
Votes: 0
If it's really that annoying, it should be pretty trivial to randomize the order that player descriptors are processed in each iteration of the update loop.

I vaguely recall it doing a for() loop around the list of descriptors. Allocate a new array of pointers, add each descriptor to it in a random position until it's full. Use THAT array to iterate over. Free when done.

Boom.. now it's "fair" in the sense that each player will be processed at a random point on each loop, effectively implementing an initiative roll that's entirely random and not affected by any in-game mechanics.
06 Oct, 2015, Rarva.Riendf wrote in the 10th comment:
Votes: 0
I is indeed simple to either randomize the list of reverse it each round or whatever.
It shouls be done, at the very least as a simple workaround.
I am still thinking about something else, Like giving priority the new round to someone that did "nothing" or used a basic skill.
But for that I would need to 'order' skill in such a way. Will do it, eventually…maybe…one day.

It is something to think about though, if you actually car about pk.
07 Oct, 2015, plamzi wrote in the 11th comment:
Votes: 0
Rarva.Riendf said:
I am still thinking about something else, Like giving priority the new round to someone that did "nothing" or used a basic skill.
But for that I would need to 'order' skill in such a way. Will do it, eventually…maybe…one day.


You can always think of a solution to a problem that's so involved, it compels you to do nothing instead.
07 Oct, 2015, Rhien wrote in the 12th comment:
Votes: 0
I tend to agree with Quixadhal. The default system could use some work, but if you're one round people or one round gives you that much of an advantage then something is broken.

I tend to think even the out of the box system can work well with additional skills and spells (from new classes) that diversify what a player can do in PK. I've spent a lot of time PK'ing on one ROM base in particular (that has something around 36 classes now) and the make up your group and their skills can make a huge difference in your success where some skills and classes can offset others. Imagine being in a battle where a mage looks like they'll lose but they have other mages ranging fireballs in from another room in the distance (you can come up with limitless ideas that put twists on even the vanilla system if the core weren't to change).

Not to say randomizing the list is a bad idea, it's a fine idea. Pointing out that the base system with a few tweaks can work fairly well. There are some good ideas in this thread though. ;-)
09 Oct, 2015, Rarva.Riendf wrote in the 13th comment:
Votes: 0
>You can always think of a solution to a problem that's so involved, it compels you to do nothing instead.

True fact. THe real reason is I have only old farts like me that occasionally plays, but mostly chat.
So not a real priority :)
0.0/13