The Great Stack Exchange and Combat System Code

I assume that most people working on their first (or twentieth) game probably know about Stack Exchange, probably even use it now and then.  If you don’t, I can’t recommend it highly enough.  It’s my go-to place to help me figure out what I’m doing when I get stuck.  GameDev.SE is a great place for game development specific stuff.  StackOverflow is the place to go for code-specific questions that aren’t related to game design or development.

Yesterday I posted a question for a sanity check.  This is the sort of thing that I have to think through several times before getting it right.

If you don’t want to click the link, the short situation is that I’m probably going to have DamageListeners on all creatures that can take information about an attack and process it for the actor.  All damage-causing things (weapons, spells, traps, environment) will have a DamageTalker that processes the information and tailors it to the specifics before sending it to the receiving actor.  In between, a DamagePackage will contain the specifics of the attack.  I’ve debated whether this is overkill or not, but because of some custom damage, DoT, and effects that an attack can apply, I wanted to have a very customizable collection of information about the attack from both sides.

Leave a Reply

This site uses User Verification plugin to reduce spam. See how your comment data is processed.

This site uses Akismet to reduce spam. Learn how your comment data is processed.