Advertisement Jump to content

Player interaction in a MUD

Recommended Posts

I am making a multiplayer text game similar to MUDs or online RPGs. I wanted more concrete environment to play in, so items have position (and size) in the room. Players always see map of the room, it looks little bit like a rogue-like. The game primitively recognizes whether something is on/behind/under something else.

I had a vague idea of a combat system where players could cover behind furniture, sneak up from behind etc. A problem comes in when players interact with each-other. Ideally one player would send a command to attack, the other would react and so forth. That would make the game turn based. But how to handle turns? There could be a let's say 30 second timer for each player to decide their action, then the game would spew out a few lines of what happened, and the cycle would start over. This would limit the playability severely though. Thirty seconds to walk up to a table, thirty seconds to pick up and item from it, thirty seconds to equip it...

Of course we could exclude players not in combat from the turns and just let them do whatever, but that would mean they could freely walk up to somebody and attack them with a positional advantage and so on. 

Other problem that comes to mind is how to implement player movement at all, whether they should move one unit at a time, make one movement command move them to one entity or let them move freely between rooms like in MUDs, disregarding their contents.

This player interaction issue doesn't concern just combat, but it's a classic example. I don't want players neither mashing their keyboards to out-move others, nor do I want them to wait for their turn when it's not necessary.

Can you share your experience with these issues or send some materials about it my way? I'm not a MUD veteran, so I might have missed some discussion or article. 

Share this post

Link to post
Share on other sites

Many MUDs do realtime combat. When a character enters combat mode, it automatically attacks its target on a set frequency, such as once every 5 seconds, until it exits combat mode, the target dies, or the target flees in a way that the attacker can't follow. But this isn't very sophisticated. It's as if the two characters are standing toe to toe alternately bashing each other with clubs.

You could do this but add modifiers if the player submits positioning commands during combat, such as hiding behind a table.

Or, if combat isn't the primary focus of your game, you could resolve the entire battle in a single action. This would allow you to assemble a dramatic description based on the properties of the combatants.

Share this post

Link to post
Share on other sites

You might also consider simultaneous turns. Each player queues up one or more actions, and once both commit, the actions of both players are resolved at once, and the next turn begins. 

There are plusses and minuses to such a system. Typically combat flows a lot faster than with alternating turns, and it becomes more about anticipating the enemy's next move, rather than countering their previous action. If you take this concept to it's extreme, you end up with each player queuing all their actions for the fight at the start, and resolving the outcome in a single turn.

Share this post

Link to post
Share on other sites

One game i play allows players to use up their actions-points as fast as they like, but for combat they can issue 1 attack per second while each attack also means the other party shoots back.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!