Expanding gameplay upon the core

Since my last update of my endless runner game, I expanded the main mechanics with a charge ability to smash through new breakable boxes spawned on top of the platforms, and added an automatic slowdown ability to help with survivability. I also created an editor function in Unreal to assist me in visualizing the spawn sequences of the platforms as the complexity of designing them increased. A bunch of new visuals and sound effects were finally added to enhance the experience of the game.

Starting with a breakable box prototype

I introduced the breakable boxes in my game to provide an additional challenge, break things up, and give more visual dynamics, all while preserving the core platform rotation gameplay. The boxes spawn attached to platforms and players must charge to break them, earning points.

I first created a prototype of the boxes without a charge function and then pre-placed boxes in the scene. I was already getting sold on the feature once adding in the final touch of physics and dissolve effects. It was around this time that I figured SFX was going to become important to help this feature pack a punch and I utilized some old audio assets from Gravitos to test it out.

After making a simple spawn sequence with the boxes, I enjoyed the alternating between the platform rotation and the timing of bashing the boxes away. I immediately noticed that the boxes break up the lull or trance that the game can sometimes put a player in from just focusing on platform rotating. Now suddenly, players are met with a visually different block that requires a different action, it refocuses a player’s attention on the game.

Designing the two interlocked features

Considering that the charge function and the spawn design of the platforms severely affect one another, it was important to approach creating these features with both in mind while also taking care to preserve the core of the game. However, there were challenges to overcome, such as ensuring that the random spawning of blocks doesn’t create impassable sequences or platforms that are too impossibly short for the charge to work on.

Considering all the above, this made it clear to not pursue any ideas like:

  • A cooldown for the charge any longer than a few seconds, as that would not work in a random game that could spawn a sequence of boxes.
  • Requiring a set charge length that the charge would last for, as this would be problematic in situations of shorter blocks.
  • Letting the boxes spawn randomly on any platform, as this is too unpredictable and could make some impossible situations.

There were two main things that I wanted to try out with the charge, but I couldn’t decide which one would be better without prototyping both.

Creating the charge mechanic

The two main ideas I was considering for the charge was to make it a ram that you toggle or a sprint that the player can hold.

The ram toggle function

The first attempt was the ram toggle where the player right-clicks to initiate a charge that must be completed before the animation finishes. However, this led to issues with spawning boxes randomly, as they could sometimes be spawned in impassable sequences requiring charges in quick succession.

This led to further experimentation with a ram cooldown or speedup without a cooldown, ultimately choosing the latter. It allows skilled players to use the charge more frequently to speed up the game and earn points faster, but at the cost of increased risk of death. The speedup elegantly lets players to control their game experience, rather than being restricted by a cooldown that could also lead to impassable sequences. The revelations from this prototype influenced my ideas for the next.

Charging through the boxes, with one flying away.

The sprint and hold function

I then tried the sprint and hold setup where the player can charge for as long as they want, while releasing the button ends the charge. This resolved the issue of impassable box sequences as the player can hold the charge longer to pass through more complex sequences. Also, the charge speeding up the character made a cooldown unnecessary, as the player will eventually collide with a platform or fall off for a game over.

The sprint and hold setup proved to be the most adaptable for random level design, and the visceral experience of sprinting added an extra layer of excitement. It was quite satisfying to watch the character dash though a chain of long platforms with the multiple boxes placed on them flying off. I added in one final tweak to make the mechanic require more commitment by the player: a minimum sprint time of 0.25 seconds, which should also give time for the animation to play out.

Wrapping up

I initially intended for the boxes to require strategy and the charge to be a timing mechanism, similar to the ram toggle. But this was shown to be incompatible with the randomization of the game, so testing both styles of charging helped me understand what worked best. This charge style also influenced my approach to spawning the boxes later on.

Creating a simple editor toolset

I was able to memorize and visualize the platform sequences when first creating them, however upon returning to the sets, I found that I’ve largely forgotten them. Too add, as I planned to create more sequences, relying on visualization alone would become increasingly challenging. It became clear to me that creating a toolset to aid in making the platform sequences would be beneficial going forward.

I scripted a way to generate sequences in the editor, make some tweaks, and regenerate them to see the changes. I based the script on my in-game generator and utilized Unreal’s editor functions to create buttons on the spawner to display and clear the sequence. I also added functions to cycle through the row names and invert the sequences.

Creating the toolset was very beneficial, not only did it make it easier to iterate on more interesting and challenging sequences, I was also able to sort out some calculation issues with my original box spawning which were harder to detect while running in-game.

A simple challenge where the player can rotate the platform and box out of the way or align them for a charge, gaining more points.

Making new platform sequences with boxes

With the mechanics and tools in place, I designed new platform sequences and made edits to the original ones. My goal was to expand on the original categories listed in my previous post, largely focusing on “Trick” and “Jump” styles, as they allowed for the most interesting set ups using the charge ability.

One of the hardest sequences where the small platform is a decoy, the player must instead rotate it downwards and charge to cross the gap it leaves behind. See the video for the full footage.

Some examples are:

  • Jump gaps requiring a charge to make it through, either due to platforms being far apart or requiring a box in front of a jump space. Boxes in these sequences are also used to signify that a charge is required to pass the gap.
  • Optional blocks where players can choose to make a swift rotation or charge and jump across the gap, providing strategic choices in the game.
  • Long blocks with a chain of boxes and blocks that players have to dodge, playing with the focus from typical platform rotation.

I had to of course ensure that sequences don’t lead to dead ends. A common way I tried to ensure that was adding platforms at the beginning or end of sequences to smoothly transition into the next one.

A medium difficulty sequence where the player must rotate the platform and charge through boxes. The first platform’s rotation also affects the last one, requiring quick reaction at the end.

Adding a slow-motion feature to help the player

A main goal for this endless runner is to help the player survive in a subtle way that gives them a sense of accomplishment. I’ve already added two features for that goal: stopping a block’s rotation at 0 degrees for a tick and allowing the player to step up or fall down blocks without it counting as a game over. In this new update, I added a third way: slowing down the game when it detects the player is about to collide with a block.

During my playtests, I realized the slow-motion feature was crucial, as the breakable boxes added a new layer of complexity that could feel unfair if the player just missed a move. However, simplifying the levels wasn’t an ideal solution, as overcoming those moments is rewarding.

This auto slow-motion feature is a happy medium, giving the player a second chance to recover without adding more controls for the player to worry about. I also extended it with a noise effect that increases as the player gets closer to death, providing visual cues to warn them of impending death.

The noise effect appearing just before the player collides into the block.

Next up

That concludes this update! Next, I plan to create the main character and its animations then begin UI design. I have a character in mind that is perfect for the charging action, I’ll use 2D sprites for the animation because of my previous experience. It’ll be interesting, as I haven’t done character animations in a while.