I'm making a text based adventure in Java, and currently I have a fairly limited combat system where you can do one of 3 things:

  1. attack with your sword
  2. attack with magic(if its unlocked)
  3. drink a health potion

This system works but is fairly boring and uninspired. I want to make the combat enjoyable yet given the limitations of a text based game, but I don't know how to accomplish this. If anyone knows how to make this system more engaging/fun, it would be greatly appreciated.

  • 2
    \$\begingroup\$ How does the combat work? does the player have an ATK and DEF? and how is this calculated against what he/she is attacking? \$\endgroup\$
    – Ryan white
    Commented Aug 11, 2016 at 12:37
  • \$\begingroup\$ 2 stats effect your melee damage, your STR and your sword (upgradeable at blacksmith) you magic is effected by INT and your magic level (upgradeable at wizard school) and what spell you use. and those stats set your max damage and it picks a random int equal or below said max damage \$\endgroup\$
    – xlis1
    Commented Aug 11, 2016 at 12:42
  • 1
    \$\begingroup\$ Add some response actions. You can have something like "try to parry and counterattack", "try to dodge", etc. You can make some events that print some additional text from environment. Make it more like sports commentators do. Let the narrator describe the grass being thrown in the air and all the other things that might happen during combat. And maybe add some funny texts (not too much!). \$\endgroup\$
    – Mars
    Commented Aug 11, 2016 at 12:44
  • 2
    \$\begingroup\$ I would suggest you search google about MUDs (Multi-User dungeons) and try a couple of them. These are terminal-text-based multiplayer games where you have to fight, among other things. This could give you some ideas. \$\endgroup\$
    – Vaillancourt
    Commented Aug 11, 2016 at 13:02
  • 1
    \$\begingroup\$ I recommend taking a look at a game called Dragon Realms. It's a MUD game that's still going strong today. And it's combat is actually pretty interesting in how it was done. \$\endgroup\$ Commented Aug 12, 2016 at 3:17

12 Answers 12


Basically, you are looking for ways to improve the player's choices; the ways to do that are to make the choices more interesting &/or meaningful. By meaningful, I'm referring to the impact a choice has to the overall experience. Without knowing more about the game's other systems, narrative, etc, I'm going to set aside the meaningful part as out of scope for this answer. Instead, I'm focusing on some ways to add measured uncertainty & complexity to the combat system to make it more interesting.

Based on the information presented, I suspect that there's more or less a clear strategy for combat, probably something along the lines of:

  • If health is low & potion is available, drink potion
  • Otherwise, select most damaging attack option

These sorts of patterns don't take long to discover & once found the game play consists of going through the motions. You've already tried a couple of solutions:

  • There's a bit of push your luck regarding when to use a potion (Hmmm, how low is low?)
  • Damage is randomized, which leads to a bit of anticipation (Did I roll good numbers?)

Here are some ways that you can add complexity to the system with the intent of making decisions more interesting:

  • Create situation where the answer isn't always obvious:
    • An attack that damages multiple enemies a little bit vs. damaging one enemy a lot
    • An attack that does less damage now, but adds an effect like, damage over time, chance to stun, reduce enemy accuracy, etc
  • Add some uncertainty to the potion system:
    • Potions degrade overtime, creating more uncertainty about when best to use them
    • Potions provide variable healing over time (up to some cap)
    • Health potions also temporarily increase player damage, thus encouraging earlier use in combat
  • Create systems that encourage the player to push their luck
    • Mana points only regenerate when the player is below 50% health
    • Health potion can be cashed in for some reward (XP, stat bonus, etc)
  • Create systems that reward mastery
    • Player estimates # of round combat will take, if their guess is close, they get bonus XP

It's possible to add complexity, uncertainty & encourage the player to take risks. i.e. give the potions a random number from 0-9. Potions heal more based on how closely their # matches the last digit of damage most recently dealt to the player.

Since GDSE is more about Q&A than opinions, I want to emphasize that the examples are just that. The core answer is to find ways to make the system(s) in question interesting, without making it too complex, arbitrary or inscrutable. If you need additional opinions on how to make that happen, you may need to go to GDSE chat or a gdev forum like TIG Source.

  • 3
    \$\begingroup\$ "player estimates # of round combat will take, if their guess is close, they get bonus XP" - I think this is a really neat idea \$\endgroup\$
    – Landric
    Commented Aug 12, 2016 at 13:20
  • 4
    \$\begingroup\$ Mastery is tricky to do right. A lot of games do it wrong, and the net effect is to encourage the player to prolong or otherwise focus more on less interesting encounters, thus making the game less interesting on average. \$\endgroup\$
    – user64554
    Commented Aug 12, 2016 at 17:39
  • 1
    \$\begingroup\$ Accuracy (and dodge/parry) as well as Defense are also valid things to add. Have a passive low change to dodge, increased by a new stat speed/agility, which perhaps also affects the speed and accuracy of your own swings. Low accuracy but high powerd attacks are also valid, as well as an option to defend instead of attack (increase parry and/or dodge chance) and perhaps have some other kind of benefit (attacks that take a turn or 2 to charge, you defiantly would want to defend against them) \$\endgroup\$
    – Ryan
    Commented Aug 12, 2016 at 20:37
  • \$\begingroup\$ Another interesting aspect for the potion thing, I saw in a game once but don't remember which game, is you could find potions and scrolls and stuff but not know what they are. You could use them in which case you'd find out what they were, or you could hike all the way back to town and get them identified. So when things got super critical and you were out of options, sometimes you were in a position to use one of your unidentified potions, which usually was some sort of healing potion but sometimes could be poison or something with a negative effect. It added a bit of depth to the items. \$\endgroup\$
    – Jason C
    Commented Aug 14, 2016 at 21:16
  • \$\begingroup\$ (I think it was Castle of the Winds). Btw another interesting bit of "spice" I've seen is weapons with a durability stat; defined as either a finite amount of uses, or a random chance of breakage (I like the latter's unpredictability), or perhaps an ever-increasing chance of random breakage. And the weapon didn't do damage on the turn it broke. So you might have a choice between weapons but have to weigh your options - losing the weapon / having an unsuccessful attack vs. a more reliable weapon. Also added depth to the game's items. \$\endgroup\$
    – Jason C
    Commented Aug 14, 2016 at 21:16

One time I played a game which had one of the best text-based 2 characters combat systems I ever played (the game was awful in every other regard, so I forgot its name):

  • Each side had a number of attacks to choose from
  • The damage inflicted by each attack was based on one stat of the attacker and one stat of the defender.
  • Each attack caused a stat-modifying effect on the attacker and a different one on the defender. Both effects could be good or bad.
  • The status effects lasted for a number of rounds. Receiving the same status effect again did not stack. It just reset the timer.

Why did this system offer a lot of depth?

First, it is not always obvious which attack does the most damage right now, because you have to look at the status effects currently affecting the attack-stat and the opponents defense-stat for the attack. Well, when the player completely understood the game mechanics this is just a simple calculation, but very few players will analyze your algorithms so deeply and will just make educated guesses.

Second, even if you do figure out the most damaging attack, you have to look at what impact its status effects have. For example, using the attack which boosts the enemies STR might be bad, but on the other hand the enemy only got one STR-based attack and that attack targets DEX, and DEX is your best stat, so it might not be that bad. The attack also boosts your INT, which sounds good, but you still have 3 rounds of INT boost left, so you might rather want to use the opportunity to get a boost for a different stat.

I am not saying that you should copy this system. What I want to say is that if you want to design a deep turn-based combat system, make sure that

  1. There are many (but not overwhelmingly many) options to decide between
  2. Each decision has multiple long- and short-term consequences
  3. The impact of these consequences depends on previous decisions, so the ideal decision is not always obvious.
  4. Most importantly, there must not be one option which is always or almost always the ideal choice.
  • 2
    \$\begingroup\$ Your 4 point summary is spot on. \$\endgroup\$
    – Pikalek
    Commented Aug 12, 2016 at 21:20

It's often said that games are most fun when their choices are meaningful. If your mechanics too simple, your choices become obvious (e.g. health low -> drink health potion), and the game becomes unengaging. One way to make choices meaningful is to make them require skills such as observation, prediction or planning.

A great example of this in action is Chrono Trigger, a JRPG with the following features and necessary skills:

  • Enemies have various abilities like regeneration, vulnerabilities, counterattacks, such that it's not obvious which attacks should be used on which, or which order. Players need to observe how the enemies behave in order to formulate a strategy.
  • Some enemies had triggered vulnerabilities, e.g. a creature has very high defense, until you hit it with a magic spell. Players need to plan their attacks, to trigger its vulnerability first before following up with normal attacks.
  • Some enemies had timed vulnerabilities, so players need to predict when this happens, and attack accordingly.
  • Players control a party of characters, and the most powerful attacks involve multiple characters attacking together. But to pull this off, those characters can't be doing something else, like healing, or using a spell to trigger an aforementioned vulnerability. Because of this contention, players had to plan their character actions in advance, so that the right characters are available together to pull off these powerful attacks.

To build on all this, the game gives you different equipment, throws different enemies and enemy compositions at you, and sometimes even forces you to change your party members, all of which affects the relative efficiency of different strategies, and how you play the game.

But this is just one example, and what mechanics they use isn't the important part, it's the skills they need the player to learn. Other examples of skills include timing/reflexes (typical of action games), deduction (puzzle games), long-term planning (strategy games), or yomi (fighting games). Focus on the skills to make a boring game into a more engaging one.


The MUD gemstone 3 had great text based combat.

Being a MUD, it had real time combat and was multiplayer.

One of the more memorable things was that it had stances. You could be defensive, neutral or offensive, and would change stances during a fight.

There was also the concept of round time for your attacks. Heavier weapons and armor (and less strength, or lack of a haste spell) meant longer round times.

So, you would have a round time of X seconds, and the thing you were fighting would have a round time of Y. (Assuming a single opponent)

Since you and your opponent could only act when your round time timer wasn't going, a good fighter would "stance dance".

The goal would be to be in offensive stance whenever you attacked, and to be in defensive stack whenever you got attacked.

You'd have to time things based on your round time and theirs.

It was pretty fun, and a good challenge of skill. Pretty nice for a text game imo.

  • 2
    \$\begingroup\$ There are a number of MUDs with text-based combat. Looking at how they spice up or handle combat can be a good source of inspiration. You can find a ranked list here: topmudsites.com (My personal favorite is Realms of Despair) \$\endgroup\$ Commented Aug 12, 2016 at 9:00

You could make it time sensitive. So you could say "The troll is swinging his club at your head..." and have the ... appear incrementally (say 0.5 seconds each). If by the time the last . appears the user hasn't ducked then the club will hit them and you say "The club hit your head, you should have ducked!"

Your defensive moves could be

  • The troll is swinging his club at your head = Duck
  • The troll is swinging his club at your legs = Jump
  • (For both of the above a step back isn't good enough; club is too long)
  • The troll is swinging his fist at your head = Duck / Step back
  • The troll is swinging his fist at your body = Step back / Block

Ensure that different attacks require different defences, so the player can't just type "block" every time and must instead react to the stimulus (the described attack).

As the fight starts you might let the user get in a punch to the head, but the 2nd attack will be blocked if it is another punch to the head. So you'd punch head, kick legs. This will also get the user to think a little about their attacks - having some kind of pattern recognition and having the character try to guess the next move would be good too, rather than just disallowing repetition. Persisting that learning tree would make for very interesting play too :)


I was working on a text-based game with a combat engine and I had the best results with system inspired by OGRE BATTLE, if you remember that title for the Super Nintendo. In my case, you controlled a party of three and could face up to five enemies at a time.

Basically, you set the tactics for your team and the combat sequence becomes automatic for a set number of iterations. Do you want to target the enemies with the lowest health, or the highest? Do you want to target the enemy that will take the most damage? Or do you want to target their leader? Save potions at all cost, or use them at a % threshold?

The sequence would progress with multiple attack exchanges, and then a prompt with come back up and you could re-evaluate and change your tactics. Like you commanding a team, not participating yourself.

Ultimately it comes down to what Pikalek is saying - it's only interesting if the choices require some thought.


Try something new.

Note: this may be long but I promise you it'll be worthwhile

If you're going to do something innovative and able to stray from the traditional multi-option combat system. I'd suggest a text based fighting system, which aren't many out there beside the MUDs (e.g: casting spells or attacks by typing their names), which is a great way to make the game way more engaging.

however as any other system it has its own pros and cons, here is a list for your convenience:


  • Typing gives a text based game something that's very unique to games of the genre, which is the action element. Especially when combined with time limitations, what's a better feeling for a gamer than to blaze through the keyboard while killing a boss and feeling like a boss😎?

  • It forces the player to actually remember his attacks and spell names rather than casually clicking buttons. Which when combined with a good story/meaning (which I believe is essential for a text based game) or some sort of pseudo language makes the player feel way more immersed in the game. In addition, it makes the community of the game fans (which I'll hope you'll get for your project 😉) much more stable since they'll have a common factor for further discussion on the game, and if you succeed at this you'll have what I like to call a Fanbase expansion factor (FEF), It's basically a feature in games that leads the fans to have a common associative point with an aspect that's unique to the game. Which is really great since it'll add passively more volume to the game, here is a good visualization of the possible outcomes of a FEF: Starting point Users play game => users learn the FEF => users discuss the FEF with other users IRL/online => further expansion of the volume of the game related content on the internet => more third parties are exposed to the game => more users are likely to play the game => elevated starting point. A good example of successful FEFs of that game are the dovah language in Skyrim or the unique bugs/sense of humor in goat simulator.

  • I think the last two points are more than enough to prove the worthiness of such system (at least before the cons). However I will add the third point which is difficulty. By integrating this system you ensure that the player would be challenged enough and that his successfulness in the game would be based more on skill rather than some unsigned integer values. Whether the difficulty would be an effective/ineffective addition is based solely on the implementation. For example the game OSU, while it's a highly challenging game and relativity popular too it scares away a lot of potential players/beginners who initially like the game.


  • It's a lot of work. Of course building such a system that's provided with a large database of keywords isn't as simple as sticking a few buttons in the GUI (without even mentioning the issues to be considered while building such a system such as combinations, typos, keyboard handling, etc...)

  • Typos. What can be more irritating and a more rage quit leading factor than being killed because of a clumsy keyboard or user, of course this could be corrected by some algorithms / integrated as a unique game element (for example, dealing less damage upon typo) but it requires a much greater deal of time and effort to implement which is an important factor when developing a game.

  • It's not for everyone. Especially if the game skills/spells are implemented in a specific language, not everyone types fast and an English native is more likely to type the spells with better spelling by dum tss or faster than any other person (same goes for all languages unless your making the skills in Esperanto). This would require the developer to provide an alternative language (or some nonsense) and would probably result in the target audience shrinking + it would make the game unplayable for really small children (which I assume isn't a target audience for a text based game)*

.* You might say "but hey what about Pokémon?". Give me a break, you know you know no one reads past the initial dialogues.

** Read the whole post if you want to know what that is.

  • \$\begingroup\$ The answer was detected as spam since it's too longl. Here is the conclusion: Finally, I'd like to conclude that implementing such a system would greatly increase the chances of a text game being successful (a FEF)** and would add action and uniqueness to the game. Although, it requires a great deal of effort and extra time investment + it poses quite a few not so simple challenges. I'll highly recommend for all text based games to start adapting this system if you want to revive that genre and stand a good chance against FPS games and MMORPGs in the market. #MakeTextGamesGreatAgain \$\endgroup\$ Commented Aug 12, 2016 at 18:45

Both player and opponent pick simultaneously, both decisions are revealed simultaneously and acted upon.

feint high.

feint low.

swing high.

swing low.

block high.

block low.

  • If you swing, and your opponent doesn't block, you do damage.

  • High swings do more damage than low swings.

  • If you swing, and your opponent blocks the correct height, you have a 50% chance that your next action will be wasted (coin flip is performed after your next actions are revealed).

  • If you feint, and your opponent blocks that height, they have fallen for your clever ruse, the person who blocked has a 50% chance to lose their next action (coin flip performed after next actions revealed).

Of course, more interactions will be needed for group fights, magic, potions. You can always add more options (power swing high/low), which does more damage if it connects, but leaves you vulnerable for the next 1+ turns.

A.I. choices can be as simple or as complex as you like, but should have some element of random in there. Basically, when people feel threatened (surrounded, low health), make them more likely to block. If their opponent is off balance, low health, surrounded, make them more likely to swing out. Also have them respond to the info the players give them - if a player always swings high, have them probably block high.


What you describe sounds to me like a text-only version of the old school JRPGs combat system.

@Pikalek does a very good job describing why these systems may be boring and how adding depth keeps them engaging. Still, I see two issues with this combat type:

  • There may be too much micromanaging. If combat is common, this may become boring fast.
  • Although engaging for hard combats, the system may have too much overhead for simple battles. When you clearly overpower your enemy it becomes a drag to play a combat.

Here is where some lateral thinking may be useful. One such example is how Final Fantasy XIII radically changed the traditional FF combat system.

In FF XIII combats happen in real time and player characters are AI controlled^. The player input is a "paradigm shift" that assigns roles to characters, instead of specific actions. Roles determine which skills each character use, and are very general behaviours such as warrior, mage, tank, medic, etc.

This system has pros and cons but I found it to be very effective and engaging.

On the negative side, you lose the fine control of your character actions, you need a pool of skills/roles big enough to be effective and probably is harder to implement.

On the positive side being real time battles are much faster and engaging, easy battles can be dispatched quickly. Also I feel that combat becomes more about strategy (how to set up your party and paradigms) and the tactical flow of battle rather than micromanaging actions, e.g.: start with a buff/debuff round, switch to warrior/mage, is there a big attack coming? quick, switch to all tank!, etc.

Implementing such a combat system is a big commitment and would impact a lot of areas of the game, so take it with a pinch of salt. Still I feel is a very compelling and underused system that I would like to play more, and seems like a good fit for a text only game.

^ To be precise, you can either manually control the main character, or set it to full auto.


Being a text based system, I would suggest that instead of there being the exact same set of choices every time, that a pool of possible phrases be used for the attack and defense options. These phrases could be weapon dependent, and could lend more of a sense of "in the middle of a changing combat". Thus when the prompt for action appears, the exact phrase for the 'attack choice' and the phrase for the 'defense choice' will be different each time.

Also, perhaps introduce a "threatened" mechanic where if one is in a dangerous position, they don't have the option of drinking a potion - or if they drink while "threatened", then they give the opponent a free attack. This could be random, or it could always be based on some circumstance of your choosing.

This should also carry over into combat result descriptions - different random/changing descriptions for hits, misses, weapon types, and amounts of damage.


Just a little tip about health I learned today from Mark Brown:

You can award a player by a health potion of different sizes for a different game styles.

See full video: How Games Do Health


By making more stats.

If you have character has only one stats that defines entire survival rate (HP) even introducing cost for attacking you essentially makes players to constantly "Use the most HP damaging attack".

Even introducing randomization in damage, and other costs (ammunition, mana, etc.) you still use your most powerful attack until it is depleted, and then second-powerful, etc.

Basically your opponent HP stat will just go down until dead.

But! There is a better alternative: first, let us introduce more ways to damage opponent. For example you could add:

  • Willpower. Will cause mental breakdown, when depleted (X-COM, I am looking at ya!)
  • Concentration. When lost, it will immediately cancel all spells that are cast by the character
  • Stamina. When melee fighter is tired his damage stats get lowered drastically
  • Pain. Will make opponent "give-in" to it, rendering him or her incapacitated
  • Fear. Will make opponent run for his live and give up the fight
  • etc.

Now mix in some special buff/debuffs, possible with dire effects:

  • Bleeding: causing losing HP until tended to
  • Burning: causing severe pain each turn until extinguished
  • etc.

And now we can go into the interesting things:

Each of your fighting-based skills should be useful against given stat. That way, let say if you encounter powerful mage floating 40 stories above ground with powerful shield you could try to wither his defenses, or cast a simple D&D-like "annoying bee" 0-level spell, that makes him lose enough concentration just to fall down and die. It actually happen to me recently in video game and - as player - I felt vastly rewarded from the game for my thinking (even it it was as simple as applied effect).

This system will guarantee that player will have to take different routes against different opponents and even trying unorthodox strategies when in unusual encounter.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .