Twine/Sugarcube combat demo

(I originally posted this in the “Links from arrays in Twine sugarcube 2.34.1” thread, but I realised some potentially interested people may miss it, so I deleted my original post and created this topic.)

I’ve seen quite a few people asking about Twine combat systems recently and it prompted me to write this simple demo. I’ve been making games with turn-based combat using Twine/Sugarcube for some time, learning by trial and error; my first attempts had some really messy code, with tons of repetitions etc., but I think I got a significantly better at this. Still, this is not the only possible way of building a combat system, and I’m sure it could be further improved/cleaned. I’m just sharing what works for me, hoping someone will find it useful.

This simple “game” has two enemies to fight (one with a very basic behaviour and another with some conditional actions), two weapons to choose from and three spells. Most of the action takes place inside a single “Combat” passage, no matter which enemy you fight. It also has some example healing, evasion and status effects.

I wrote a lot of comments inside the passages, explaining how things work - open the game html in the Twine editor to see them. You can easily expand this demo, adding new enemies and weapons etc., or copy parts of the code you find useful into your game. And if you have any questions, feel free to ask!

I also know of Another RPG Engine (Another RPG Engine by Another RPG Enthusiast), which is a tool for creating games with turn-based combat in Twine. It looks like the author has been developing it for quite some time; it focuses on team-vs-team combat more akin to jRPGs and looks really cool and advanced. I haven’t used it, however, and have no idea how complicated making a game with it actually is.

Simple Sugarcube Combat.zip (145.0 KB)

1 Like