Tag: gamedev

  • Kitbashing

    Kitbashing

    I remarked to a friend recently that solo projects are the place for bad production decisions.

    That’s exactly what I did this weekend!

    The title character Esperanto is a 95th C telepath, and I wanted to make a cutscene featuring four of her teammates. These are characters I’d conceptualized way before I started on this game, and thought about the limits of using my own costume creator.

    They are:

    Bright Chronometron – a tall, slim, handsomely moody Japanese dude with a psychedelic shirt with moving patterns (Like The Doctor from The Authority’s jacket)

    Bastionette – a chunky amazon warrior with bright neon futuristic armor

    Teddy Megaton – a teddy bear in an army hat

    Boltzmann Colony 9 – a giant monstrous figure with no head and a moving pretzel shaped brain floating in mid air, owing a little bit to Validus from the Legion of Superheroes.

    And at this point I have the modular sets by PO-Art from the Fab store to work with. I can programme, create shaders, and do some very simple 3D modelling with primitives in Unreal, but everything else I have to solve using the fine art of kitbashing.

    Oh dear! Shouldn’t be too hard, right?

    Kitbashing means making do with whatever I can find, scrounging around for meshes, textures and whatever helps to bring my vision into the game. When I modded Freedom Force I sharpened these skills by re-purposing game assets. Here I’m working in the wider pool of Unreal Engine, with access to the Fab asset store and other online resources.

    Chronometron was up first. I had slacks, Business shirt (needed to add color support to that which was simple) and a decent hairstyle for him. But… what if his shirt could animate? I took my shader for clothing, which uses an ID texture for color regions, and rewrote a copy of it using a noise function to get some animated oil slide patterns! One down!

    Bastionette was easy enough, with some Knight Armor pieces for her costume, and the body slider system I’d put in place allowing me to make her suitably stocky. An existing energy shield fit perfectly.

    Boltzmann Colony 9 was trickier. I needed to shrink his head down as much as possible with the body sliders, and then add a mesh with an animated pulsing brain texture to cover it. Making the brain shape was easy enough using three torus shapes at perpendicular axes. And searching for “Brain” in my asset folder turned up a “brain coral” material, which I copied and tinted, and then added some texture scrolling and vertex-offset pulsing. I had to set this up as a piece of Equipment, since my costume system didn’t support static mesh accessories, but it worked. I also need a big “9” logo, which lead me on a little detour of making 26 Number and 10 Letter options for logos in Gimp and adding them. I learned a few tricks in Gimp doing that.

    Teddy Megaton gave me most pause. PO-Art had a Chibi set which I’d been eyeing up for a while, so I grabbed that, and had little trouble setting this up as a new body type. It all worked surprisingly well, but did produce a giant 8 foot tall Chibi robot as default! I scaled him down as much as I could, and gave him a permanent level of shrinking as a power. He was now the right size, and looked like a little brown robot. Now I needed a couple of meshes to add on, an army helmet and at the least a teddy bear noise, maybe button eyes too. I found a suitable army helmet on the Fab store for free. I made a Teddy face out of three sphere for the nose and eyes, and set these up as equipment and got them sitting right on him, and the helmet on all other body types too!

    Finally, I did a bit of coding to allow me to make static mesh accessories for everyone, because the equipment solution was all wrong.

    I figured this out, and celebrated by making a mortarboard hat for Ms. Mind, telepathic schoolteacher, just to go even further off-task!

    None of this has advanced my schedule. I still haven’t finished the cutscene I set out to make, but I do have some new tech and toys to play with!

  • 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!