This is my first time posting here though I've been looking at some of the different posts and trying to learn what I can. Like many of the other people who post here, I'm trying to create a MUD from scratch in C++. I would consider myself a moderate programmer and started MUD programming as a fun way to learn how to code better.
I've gotten most of the telnet serve basics down and have already which accepts connections and can process the data. I'm getting to the point where I can start adding actions. However, I can't seem to think of a good way to implement handling delays, either for action delays or spell timers. Examples would be like:
1. Kill <NPC>
2. [Delay 3 sec]
3. Kill <NPC>
4. [Delay 3 sec]
or
1. Cast Spell Buff [Lasts 1 Minute]
-----
In the first case where a player is in delay before he can execute the next action, would you queue additional inputs from the player? If so, do you only keep like 1 extra queued combined or a few?
If there is any source could that implements combat with delays and maybe spells with time limited buffs/debuffs, that'd be really if you could link me.
Thanks in advance for the help.
I've gotten most of the telnet serve basics down and have already which accepts connections and can process the data. I'm getting to the point where I can start adding actions. However, I can't seem to think of a good way to implement handling delays, either for action delays or spell timers. Examples would be like:
1. Kill <NPC>
2. [Delay 3 sec]
3. Kill <NPC>
4. [Delay 3 sec]
or
1. Cast Spell Buff [Lasts 1 Minute]
-----
In the first case where a player is in delay before he can execute the next action, would you queue additional inputs from the player? If so, do you only keep like 1 extra queued combined or a few?
If there is any source could that implements combat with delays and maybe spells with time limited buffs/debuffs, that'd be really if you could link me.
Thanks in advance for the help.