Jump to content
  • Advertisement
Sign in to follow this  
The Blarg

Puzzlish combat using elemental attacks

This topic is 3214 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'll probably not try to implement this idea for a while since I'm busy with another project, but here's something that came to mind: I have a notion of some kind of RPG combat system. This system would not have any semblance of reality or pretensions of simulation, but would be more puzzle oriented and be based around "elemental" attacks. All attacks have some kind of element, flavour, colour, or whatever fits the theme. All actors also have an element. Attacks changes an actor's current element based on what their own element is. If an actor's element is "ice" and he gets hit by an attack with the "fire" element, the actor's element changes to "water". Note that this applies even if the actor's element is the same as the attack's element, and multiple attack elements may change a certain actor element to another certain element. An actor is not damaged by an attack unless his element is sensitive to the attack's element and if the actor is "weak" while he has that element. If ice is one of the elements that makes an actor weak, and if we assume that fire is one of the elements that beats ice, a fire attack would cause damage to the actor when he has the ice element. General combat would be about selecting attacks to convert an actor's element into something he's weak with, then exploiting that weakness with an attack that's strong against the actor's element. Actors would be differentiated by what elements are available for their attacks and what elements they're weak with, along with health of course. The hard part is coming up with the relationships between the different elements. Their names don't matter, but the relationships concerning how elements are converted and what elements beat other elements do. I'd need a set of elements and elemental relationships good enough to not only base an entire combat system on it but to also make it fair to actors that don't have access to a certain attacks.

Share this post


Link to post
Share on other sites
Advertisement
You could go with the even more basic elements, Hot, Cold, Wet, and Dry, where all other elements, including Earth, Wind, Water, and Fire, are combinations thereof. That is, Earth is Dry and Cold, Wind is Wet and Hot, Water is Wet and Cold, and Fire is Dry and Hot. Then the goal could be to neutralize the enemy, for example if the enemy's a fire elemental you have to attack him with water to neutralize him.

This may seem overly simple, especially compared to your ambition, but you could just add a level system. For example, 1st level enemies can only carry one unit of each element, but there could be a second level where the compositions get a bit more complex. For example, two Hots and one Dry would be, say, a grease fire, and one Hot and two Dries would be more like smoldering coals, but more importantly, it's more complicated to kill him.

I'm not saying this is a perfect idea, it feels extremely flawed to me, but it seems like a half-decent model to work on. I like the idea of having more puzzle-themed elemental combat, I hope it works out well.

Share this post


Link to post
Share on other sites
I like the idea of having combat be puzzle-based. I have a slightly similar, if simplified, system for interactions between creatures in my game. I hope you'll forgive me if I explain it in code.

Every creature has a set of elemental properties, which is basically just a set of strings, each of which represents an element. For example, a Fire creature might have the properties {"fire", "blunt"}, where "blunt" is an indicator that the creature can inflict harm just by stepping on or running into a creature. Then I invented what I call ElementalPredicates, which are objects that take an ElementalProperties object and determine if it satisfies a set of properties. Thus a creature designed to die on contact with fire will have an ElementalPredicate that evaluates to true when it sees an ElementalProperties with "fire" as one of its properties.

I also was struggling with creating relationships between elements independent of creatures before I arrived at my current system. With my current system, it is up to the designer of the creature's AI to follow conventional rules of elemental interaction, but it seemed that designer's intuition was the best way to go. The predicates can handle fairly complex logical combinations of elements. For example, you can initialize one with the string "fire&!blunt|water&poison" to create a predicate that returns true if the properties being evaluate include either fire and not blunt, or water and poison.

You could use the ElementalPredicate idea to determine with what elements actors are weak with, and for other state transitions based on elements. You might need to do something more sophisticated, taking into account degrees of strength in a given element and such.

You can see my C++ implementation on my Sourceforge project, Somnopatru (MIT licensed), here. Look for the files Elements.h, and ElementalPredicate.h/.cpp You can find examples of predicate and element creation in CreatureControllers.h, InputController.h/cpp, and TileControllers.h, IIRC.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!