The Bug Squad: An Update

Clock icon 2 Min. read

A lot has happened on The Bug Squad over the past few months and I’m quite happy about the progress so far. Here’s how things look:


My original plan was to aim for an arcade gameplay built on top of procedural levels and hordes of monsters, but I gradually pivoted to a more story-driven experience. This gave me the perfect excuse to go back doing level design work (which I haven’t done in ages) and also allowed me to code a quest system (which I’ve never done before).

Procedural generation tests

I still made some quick tests with procedural generation and with Poisson Disk Sampling in particular. The algorithm is effective at procedurally placing objects such as monsters, objectives, decorations, etc. I’ve tried to use it to generate lumps of terrain as well.

My implementation is based on this one and could be expanded to use disks of different sizes to make the object distribution more interesting. I have to say Unity is really good to make quick tests thanks to C# and the OnDrawGizmos event for debug visualization.


Migrating My Website to Astro

Clock icon 3 Min. read

During the past couple of weekends I took a break from The Bug Squad (more on that soon!) and migrated my website to Astro.

It’s been a (mostly) stress-free and enjoyable process. This setup supersedes my previous homebrewed solution built on top of Gulp, a bunch of plugins and some duct tape.

The Astro logo, an 'A' with a flame underneath resembling a rocket

Over the years my website has grown from only a couple of portfolio pages to roughly ~240 assets (including pages, images, stylesheets, scripts, etc.), which I guess was just too much for my simple custom setup to handle.

Build times were starting to get out of control. Even previewing a simple change had started to take a considerable amount of time, making iteration a pain (i.e. on blog posts).


The Bug Squad: Dash Ability

Clock icon 4 Min. read

After a couple of weeks of break spent in the south west of France — great sights, food and drinks, highly recommended! — let’s get back to work.

I’ve started implementing a basic dash ability that can be used to quickly escape from dangerous situations. The ability will be shared by all mechs in The Bug Squad. At some point I’d like to make it upgradable to make it deal damage too — we’ll see. This is how things currently look:

Implementing the dash movement

The first step to implement the ability was creating the actual dash movement. When dashing, I want mechs to be driven at full speed for some time, with players being able to steer, but not stop before dashing is over.

Mechs in The Bug Squad use the standard UCharacterMovementComponent (CMC) provided by the engine. This is a powerful (and comple😆 component that supports movement prediction on the local owning client to reduce perceived lag, as well as reconciliation with the server, interpolated location updates on remote clients, etc.


The Bug Squad: Gameplay Ability System Setup

Clock icon 6 Min. read

I’ve been waiting for a chance to play around with the Gameplay Ability System (GAS) that ships with Unreal for quite some time. The official documentation defines GAS as:

[…] a highly flexible framework for building the types of abilities and attributes that you might find in an RPG or MOBA title. You can build actions or passive abilities for the characters in your games […]

The system packs a lot of features — perhaps even too many! 😄 — but its major selling point in my opinion is the fact that it’s fully networked, with support for client-side prediction and reconciliation. Anyones who’s ever written multiplayer code knows how difficult that can be to get right. Solutions are usually project-specific, whereas GAS tries to accomplish the same in a project-agnostic manner.

GAS is also battle-tested, having being used in most of the recent games by Epic, including Fortnite. I’m planning to use GAS to drive most of the gameplay in The Bug Squad.

Getting started

If it’s true that software is only as good as its documentation, then one would be up for a disappointment with GAS: official documentation is lacking at best. Luckily, there are several learning resources maintained by the community:

  • Using the Gameplay Ability System: Unreal Fest Europe 2019 talk that provides a good high level intro to the system.
  • GAS Documentation: the definitive guide to GAS. It explains all the concepts, and then some.
  • GAS Shooter: companion project to the above. Implements a shooter game using GAS.
  • Let’s make an MMO in UE4: long video series where GAS is used to create a MMO.
  • a blog that offers advanced tips and tricks related to GAS.
  • GAS Content: a list of additional resources.
  • Lyra: UE5 example project by Epic. Perhaps too complex for what it’s accomplishing, but a good learning resource nonetheless.
  • ActionRPG: older GAS example project released by Epic. Unfortunately it doesn’t support networking.

The system is complex and will take a lot of time to learn, but over the weekend I managed to at least get the basics going.


The Bug Squad: Minimal Mech Visuals, Locomotion and Aim

Clock icon 2 Min. read

In the last post I talked about implementing a basic camera and input system for The Bug Squad. This weekend I built on top of that and set up a basic mesh and animation blueprint for the player’s mech.

Minimal mech visuals

The marketplace asset I’m using comes with a single skeleton and multiple meshes that can be combined together to customize how the mech looks.

A screenshot of the UE5 content browser showing a few assets that come with the marketplace pack I'm using

At some point I’d like to experiment with giving players the ability to customize their mechs, but for now I didn’t want to spend too much time worrying about that. Instead I’ve identified a minimal set of items needed to give the mech a more or less complete look: legs, cockpit, shoulders, arms and a weapon.

A screenshot of the mech Blueprint component hierarchy in UE5, showing a minimal set of mesh components that make up the mech

Since individual skeletal meshes share the same skeleton I’ve used master pose to synchronize animation across all components.

A screenshot of the mech Blueprint construction script in UE5, where all meshes are synced together using master pose

Let’s take a look at the animation blueprint.