Tag: superhero

  • The Fridge Arrow

    The Fridge Arrow

    In Wolfman and Perez’s run on Teen Titans, there’s a moment that always stayed with me. The Titans are being overrun in their base by the Brotherhood of Evil, and Plasmus, a Nazi experiment human-turned-bright-pink-corrosive-jelly blob, is terrorising Fran, Kid Flash’s magnetic girlfriend.

    Speedy stops him dead in his tracks with a trick arrow he jury-rigged from their fridge’s cooling unit, freezing him solid.

    It’s classic superhero science. You stop and think about it – can your fridge instantly freeze 100kg or more of water? Probably not, but it’s a pretty cool moment, in the way that Boxing Glove Arrows are cool.

    Can you pull this off in a game?

    I call this “runtime-socketing”. When you’re performing character maintenance in your base you can slot enhancements in your powers to make them stronger in various ways or add new effects. What if you had powers with one or more free sockets that you could slot at run-time on a mission?

    This also works a little like Champions HERO system’s idea of “Power Pools” where you could buy a number of points that could be changed at any time within whatever parameters you set to simulate nebulous magical powers or shape-changing or whatever.

    You can imagine Doctor Strange putting together a custom spell on the spot to defeat a specific enemy.

    Or imagine Rocket Raccoon of Guardians of the Galaxy, taking cover, fiddling with his guns to clip together a new “supergun” designed to take out the specific target they’re fighting.

    And here we are:

    I’ve set up three powerset to make use of a prototype socketing system with powers.

    Archery will have 5 Trick Arrow powers with 1 socket, and a power to give you access to some basic warheads.

    Spellcasting will have three different “Cantrips”, a beam, a projectile and a direct power, each with two sockets. It will also pack a basic set of spell modifiers as a separate power.

    It additionally gets a couple of light self-and-ally buffs (Blessing and Ward) which have 2 sockets, and there’ll be a component-based power to give you some basics to lot in there.

    Finally, Munitions gets the “Franken-Gun” power with 5 sockets (pending testing… this could get hairy!), allowing you to build your own mega-weapons at runtime.

    You can take these powersets and get by with the versatility of the powers and the basic components offered as powers.

    But you can also do more complicated tricks, such as slotting a temporary use device on your trick arrows e.g. a Stun Grenade device power.

    And you can craft your own superior or custom components to do whatever you like. Do you really want a shrinking arrow? There’ll be a chance to pick up some components that do just that in the game.

    I need to think of a way to salvage components from props, so you can create your own fridge arrow!

    And also get the Vulnerabilities set working, so I can make a jelly villain who freezes solid when they take cold damage.

  • Keeping things moving

    Keeping things moving

    RPG combat can be a big complicated system of buffs, debuffs, resistances and counters for a player to understand and solve. It can also end up being two bags of hit-points, standing in front of each other repeating animations until one of them falls over.

    One of the best ways to break up combat and make it feel alive is to have the characters move around the battlefield.

    I’ve been working on movement powers this weekend.

    What’s the gold standard for super-movement in combat? Maybe the opening scene in X2 with Nightcrawler invading the White House? Quicksilver’s fighting style in Age of Ultron? Have any game systems managed to capture this yet?

    Lunge powers are melee attacks that move the caster towards the target before delivering the attack. I had them working with a number of options, such a teleport attack that positions you exactly behind your target.

    For speedsters, I wanted to extend this so you ran past your target delivering the attack on the way. I added “Lunge Past” option that leave you 10m past your target for these “drive-by” attacks.

    If you have a target, you move towards them (or past them). If you don’t, you move forwards in a straight line. I also have wanted for a long time to make a defensive movement powerset with the simple act that each sprint or teleport gives you a short-lived dodge bonus. Stand still and you’re easy to hit, but keep moving and you’re hard to track and connect with. This seemed to cover both teleporters and speedsters well, but also a great way to avoid combat devolving into a stand still.

    I needed “kiting” behaviour for the AI. I want to specify on a per-character basis a desired minimum range. If the target is too close, they back away. This works well for ranged characters in standard enemy groups – the melee units come forwards to attack the player and the ranged or support units try to stay at range.

    Then add some code so that they can move away using a lunge power, eg teleport away or superspeed sprint away if the player gets too close, rather than just walking.

    What about fliers? I have them moving away but sticking to a ceiling height of 4m above the player when they kite.

    My code for flight movement and lunges was sometimes pushing characters through buildings and other undesirable behaviour, so I added raycasts to avoid that.

    Last on my list was leaping – I did this differently by making the character actually jump, and avoiding the raycast, as its a perfectly viable tactic to jump over an obstacle for a surprise attack.

    I made a number of general-purpose villains to test these powers under AI control, and smoothed out a lot of rough edges.

    Gold has Leaping abilities, Thunderbody’s a speedster, Tiger Wasp flies and Z Hole can teleport himself, enemies and throwable props. Max Leonus has Acrobatics. You can see them all in action here.

    I now have the following, all working nicely for both players and AI

    • Superspeed sprint to target, that can also be used for kiting and following. Provides a stacking dodge bonus, so moving around makes you hard to hit, standing still doesn’t.
    • Superspeed “lunge past” attacks where you run past your target and overshoot them while delivering a punch or disarm
    • Teleport behind the target, or teleport away for kiting or closing. Also provides a stacking dodge bonus per use
    • A fly-by punch attack
    • Flying ram attacks that do damage to yourself as well as to any targets you hit along the way. You may want to pair this with a force field or some other defence if you plan on using it a lot.
    • Leaping kick that knocks the target back from a distance.
    • Leaping high jump for repositioning, and stacking dodge buffs.
    • A “heavy landing” that knocks everyone over when you land.

    As a result, combat is feeling much more kinetic with units moving around rather than just standing still and fighting.

    I still need to work on counters to these abilities. Currently if you’re playing a purely melee character with no ranged attacks, you have to lure fliers back down to ground level by running around a corner so they approach you again.

    You can of course buy a simple ranged attack, maybe with some knockback or crowd control to turn off flight. Or perhaps throw environmental props at them? I’m now planning to make everyone capable of throwing objects, with Amazing Strength providing options to throw bigger objects.

    This buys into a more general question for gameplay. You choose your two heroes, and get confronted after that choice with a random supervillain or two while on patrol. There are some good and bad matches regardless of travel powers, eg Gold is bad news for anyone who relies on Crushing damage, but is vulnerable to electrical attacks.


    Possible solutions:

    • I forewarn the player back at base as to who they are likely to face on patrol, so they can make an informed choice.
    • I provide a rich environment for the player to improvise when they face an unlucky pick, eg electrical hazards in the city that they can use against Gold, or small props that can be used to bring down fliers.

    Sounds like something to think about for next weekend!

  • Smash it up, smash it up!

    Smash it up, smash it up!

    Property damage is a key part of the superhero genre. If you’re not punching each other through walls or throwing streetlights like javelins, you’re not doing it right!

    This is what I tackled this weekend, specifically picking up and throwing props as weapons.

    Freedom Force did this really well, with a pick up action that allowed you to carry a car or other throwable above your head, during which time other actions were locked out. You could throw it at a target, delivering heavy damage and knockback, and dropping fliers out of the sky.

    The author of the Suicide Squad mod for Freedom Force came up with the brilliant idea of spawning an invisible character to pick up and throw objects to simulate telekinesis. I co-opted this idea into my FFX system.

    City of Heroes sidestepped this with special powers Hurl and Propel that summon a physics object for the characters to throw, due to the technical and design challenges of an MMO. These were basically just ranged attacks with some cosmetic trickery.

    Champions Online followed suit from Freedom Force, in a multiplayer environment.

    In the Unity RPGRules engine I wrote, I had this exact pick up and throw mechanic working. Throwable objects had invisible bars on them, the player could approach an object and pick it up if they were strong enough, finding the best invisible bar to grab.

    But on reflection, this isn’t necessarily the best game design option.

    Pick up and throw is a setup-detonate action. You see the nearby prop and it’s a special opportunity. You then need to orchestrate the right distance, clear line of sight and so on to make it work for the pay-off of big damage.

    The two stage action of pick up and throw with lengthy animations mean that by the time you’ve launched your projectile the target is already hitting you, or defeated. Freedom Force allows you to stop time, whereas Esperanto does not.

    I wanted to make it easier and more fluid to grab an object and throw it.

    Unity RPGRules had a TK status effect that worked like this.

    • If you have a primed object, you throw it at the target
    • If the target is a throwable, you prime that object, and it hovers in mid air until thrown.
    • Otherwise, find the nearest throwable object to the target and prime it.

    I decided to replicate that pattern in Esperanto. As for physically picking up and throwing, with the last point being that you find an object near you. I’d get the character to do a one handed scoop animation followed by a throw.

    I figured the easiest way to present this to the player was as a power you can buy. Amazing Strength now has Throw Object. You can enhance it to allow you to pick up bigger objects.

    This way you can keep your target on your opponent, run near a throwable and just double click to scoop and throw in one fairly smooth movement. I still lok you out of using any other powers while carrying a throwable in your hand.

    A whole big task list came out of this…

    1. Get TK working, so you remotely pick up and prime objects, then throw them.
    2. Make the thrown objects do damage on hit, to both the target and themselves
    3. Add mass and conditions
    4. Get Throw Object working using some settings in the TK effect to glue the object to the characters hand and freeze their animation with their right hand up in the air.
    5. Intercept the animation when you throw to be a throw rather than a pick up
    6. Make sure the object’s physics get turned off while you’re carrying it, and get turned on again for the throw.
    7. Add Visual FX eg hovering TK objects get a customisable particle effect on them.
    8. Get the AI to use this sensibly.
    9. Make sure the character drops the held item if they’re mezzed, killed or knocked back.

    The AI of throwing objects

    I use a method called Utility AI. Each power can evaluate how good it is as a single number, with a chosen target, and then a weighted random roll determines which one is picked. That power is then executed.

    The standard Execute code is:

    • Are we within range? Do the power.
    • If not, run at the target to get into range.

    With Throw Object this becomes more complicated:

    • Am I holding an object? If so, throw it!
    • If not, find the nearest object I can pick up and throw. Is it in range? Pick it up.
    • If not, move towards the nearest object.

    This starts to resemble Goal Oriented Action Planning, a more sophisticated AI technique that deals with chained goals. I’ve managed to shoe-horn this behaviour into Utility AI for now, and its working well enough for a first pass, as the video shows.

    I then had to make a Telekinesis powerset to support the TK status effect, one which felt distinct enough from the existing Force Fields set. Luckily, I had the pieces pretty much in place for:

    • A direct knockback attack.
    • A reverse knockback equivalent.
    • A TK Disarm that pulls the targets weapon to you
    • A short-lived buff to yourself or an ally that redirects all projectiles for the next few seconds. (If you want better protection, look in Force Fields)
    • A simple passive buff that extends your “Reach” so you can use interactable objects from a distance.
    • A TK hold toggle that leaves the target held in mid air as long as you continue to expend energy on them.

    And that was Saturday!

    I need to make a TK villain for you to fight next!