Implementing a DIKU-style combat system

100 views
Skip to first unread message

bowy...@hotmail.com

unread,
Oct 26, 2017, 1:47:36 AM10/26/17
to Evennia
Hi! I'm new to Evennia, and I'm still weeding through the code and documentation (which is prolific!  and fantastic! thank you!), but I think I have a pretty solid understanding of the API and how to interact with it.

My MUD experience is focused mainly on DIKU and derivatives, so I'm very used to and comfortable with that style of combat system. For my little project (which may never see the light of day, but is fun to work on during cold winter nights), I'd like to implement a diku-style combat system.

One thing I've noticed about this codebase is that there is no reliance on "ticks" as we would be familiar with from the old diku systems.  I do see some utility methods that can create this, but before I try my hand at doing so, I'd like to garner some input and advice from you.

My question: On a high level (say 5000 feet), how would you go about implementing a reliable and scalable DIKU-style combat system?  What are some pitfalls I might encounter?  How might I implement each combat cycle?  Are there examples out there I could peruse?

Thanks a million! I'm really liking some of the things you've done here, especially the CmdSet functionality that can be tied to individual objects! Really cool stuff.

Thanks,
Stymie



Dave Brannigan

unread,
Oct 26, 2017, 5:28:11 AM10/26/17
to eve...@googlegroups.com
I think that scripts probably lend themselves most easily to combat, since you have a built-in timer/repeating call that you can use for combat ticks or rounds, and scripts are TypedObjects which can store arbitrary state information through using evennia Attributes (like 'self.db.current_combatant = player1', for example) and Tags. Ainneve (the Evennia demo project) has a combat system, and there's a contrib that's being worked on for turn-based combat, I believe. The combat system for my own game is turn-based without a timer, but I still use a script for keeping track of information related to the combat state.

The Tickerhandler object was designed specifically to be like ticks/heartbeats for different MUDs, I believe, so you probably wanna also have a look at that if you haven't already.

--
You received this message because you are subscribed to the Google Groups "Evennia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evennia+unsubscribe@googlegroups.com.
To post to this group, send email to eve...@googlegroups.com.
Visit this group at https://groups.google.com/group/evennia.
To view this discussion on the web visit https://groups.google.com/d/msgid/evennia/c75d1ed6-c963-4814-a81c-446b62425f3b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mike Taylor

unread,
Oct 16, 2018, 3:38:45 PM10/16/18
to Evennia
Coming into Evennia after reviving a DIKU-basd MUD and curious if anyone's done the work to implement a twitch-style combat system in Evennia yet? If not, anyone willing to help contribute if I'm willing to take on the bulk of the work to get it started, and then submit a MR to get that into Evennia as a boilerplate combat system?

On Thursday, October 26, 2017 at 3:28:11 AM UTC-6, Tehom wrote:
I think that scripts probably lend themselves most easily to combat, since you have a built-in timer/repeating call that you can use for combat ticks or rounds, and scripts are TypedObjects which can store arbitrary state information through using evennia Attributes (like 'self.db.current_combatant = player1', for example) and Tags. Ainneve (the Evennia demo project) has a combat system, and there's a contrib that's being worked on for turn-based combat, I believe. The combat system for my own game is turn-based without a timer, but I still use a script for keeping track of information related to the combat state.

The Tickerhandler object was designed specifically to be like ticks/heartbeats for different MUDs, I believe, so you probably wanna also have a look at that if you haven't already.
On Wed, Oct 25, 2017 at 1:03 PM, <bowy...@hotmail.com> wrote:
Hi! I'm new to Evennia, and I'm still weeding through the code and documentation (which is prolific!  and fantastic! thank you!), but I think I have a pretty solid understanding of the API and how to interact with it.

My MUD experience is focused mainly on DIKU and derivatives, so I'm very used to and comfortable with that style of combat system. For my little project (which may never see the light of day, but is fun to work on during cold winter nights), I'd like to implement a diku-style combat system.

One thing I've noticed about this codebase is that there is no reliance on "ticks" as we would be familiar with from the old diku systems.  I do see some utility methods that can create this, but before I try my hand at doing so, I'd like to garner some input and advice from you.

My question: On a high level (say 5000 feet), how would you go about implementing a reliable and scalable DIKU-style combat system?  What are some pitfalls I might encounter?  How might I implement each combat cycle?  Are there examples out there I could peruse?

Thanks a million! I'm really liking some of the things you've done here, especially the CmdSet functionality that can be tied to individual objects! Really cool stuff.

Thanks,
Stymie



--
You received this message because you are subscribed to the Google Groups "Evennia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to evennia+u...@googlegroups.com.

Griatch Art

unread,
Oct 17, 2018, 4:49:43 AM10/17/18
to Evennia
There is no pre-made twitch-style combat system in our contribs and I don't think I know of one made available to the community. Most tend to go for turn-based of one form or another. Making of a twitch-based system would make use of the TickerHandler most likely. Note that you don't need to run on a fixed 'tick' in Evennia. You can just set up how long things are going to take to finish individually if you want - the TickerHandler only formalizes this and essentially allows you to run any number of 'tick rates' simultaneously. Ticking was required in DIKU due to how the server itself operated.

I guess the reason no one made a 'twitch' system contrib yet is because it's potentially hard to make a general 'framework' for it; a turn-based system needs the turn mechanisms and can be made as a framework into which each dev can then plug in their combat commands/stats etc. Setting up a twitch system is mostly based around defining the game-specific things like what attack commands you want, how damage works, attack/defence etc. So I think it's likely more game-specific per definition. That's not saying it would not be great to have a contrib twitch system for people to build from  - one just need to be careful in designing it, expecting and making it easy for people to tear it apart and put in their own game-specific stuff.
.
Griatch
Reply all
Reply to author
Forward
0 new messages