Barrier Blast Devlog

Barrier Blast title screen

Barrier Blast is my entry for GMTK Jam in July 2017. It's an arcade game for PICO-8 which was developed in 48 hours. I started shortly after 6pm on Friday and submitted right at 6pm on Sunday. It was an excellent jam and I really enjoyed participating in this one. I spent most of the weekend in a nice flow and ended up with a game I'm really proud of.

The game is an arcade game where you control a wizard and smash gems and shoot magic at things. Go play it!

When I remember to breathe and let myself enjoy the work, get lost in it, it flows so much better
Matt Thorson

I saw this tweet shortly before the jam, and it ended up influencing my mindset all weekend. Matt posted this in the context of working on finishing Celeste, a huge project. But it really clicked with me and crystallized some thoughts I was having about creativity and jamming music. I kept thinking back to this throughout the jam.

Based on feedback so far, I think in my next game jam I'm going to make an easier game. I think an easy game that feels good and makes the player feel powerful is likely to be more competitive given the short amount of time people spend on your game when rating it.

First gameplay GIF I recorded GIF with no gamefeel Final GIF

To start off, I brainstormed a bunch of ideas. I knew from the start that I wanted to do something in an arcade style if possible, because PICO-8 excels at that and I've been wanting to make an arcade game for a while. I came up with about 6 other ideas before I thought of the core mechanic of Barrier Blast.

It's interesting that the jam had a few recurring themes, and one of them showed up on my list. I guess grappling hooks are a popular dual purpose mechanic. 😜 I had also listed a "grenade game where you must boost yourself around with the grenade explosions" which I ended up finding when rating games. Bouncing Betty uses that mechanic and is pretty fun, check it out!

You have a force field which protects you, but you need to throw it at things (leaving yourself vulnerable)

As soon as I thought of this one, I liked it better than the other notes I had. I got to work right away.

Early GIF with bad graphics

I like to focus on one aspect of the game at a time when working, and then switch whenever I start to feel tired of working on it. To start with I focused on code... I didn't even really think about a theme yet. So my early GIFs have truly terrible placeholder art.

I started by developing a very simple platforming system. For a game where platforming is the core mechanic, this would not be good enough. But for an arcade game played one screen at a time, it was perfect. I played a little Mistigri and based the feel of my movement on that game. Mistigri is one of my favorite PICO-8 games, and is a great arcade game. Benjamin Soule's art and game design are a big source of inspiration for me.

For more details on the platforming system I developed for Barrier Blast, check out my Simple Platformer page.

In a game jam, it's important not to spend too much time making code "perfect". At first I didn't like having the gravity add 1.0 to the fall speed every frame. When I tried setting it to something like 0.8, something about my collision detection caused the player to fall through platforms. Instead of spending a lot of time getting this working correctly, I stuck with the 1.0 fall speed.

Force field effects GIF GIF of wizard falling endlessly GIF of targets with screen shake

With basic platforming figured out I decided it was time to pick a theme, and do some art and effects. I ended up picking magic as a theme, so I made a wizard sprite and some castle themed environment tiles. Looking at Mistigri, I noticed that each level tended to use just a few tiles. Usually each level would have a solid platform, a fallthrough platform, and some background accents. This was the pattern I followed.

After adding this basic art, I moved on to effects. I like to use lots of particles in PICO-8. It's very easy to make simple pixel particle effects, and they look good at PICO-8's resolution. I'm splitting some discussion of the particle system off onto its own page.

Demonstration of one fireball Wizard being pursued by many fireballs Wizard's hat falling forever after death

The first enemy I added really ended up being the core of Barrier Blast's gameplay. It's a fireball that slowly approaches the wizard and then lurks just out of reach. If the wizard's force field goes down, the fireball charges in to toast them.

I like having the wizard's hat fall to the ground after the player dies. I find it really funny when the player dies in a spot where the screen wraps around and the hat falls forever.

At this point I added a background sprite to show where the fireballs spawn from. The fireball spawns ended up being a tough design decision for me. I think they should fade into the background since you can't interact with them at all. On the other hand it's important to be aware of where the fireballs are spawning from, because you don't want to be right next to it when a new one appears. I tried it both ways and ended up with a compromise where the spawns use a slightly brighter color than any of the other backgrounds, but it's still a darker color than most of the sprites use.

Fireballs with sprites but no explosion effects Fireballs with explosions Magic missile effect

Time for art and effects again. I put eyes on the fireballs. Eyes make everything cute. I did another simple particle effect for the fireballs, more details are on the particles page.

I felt like the particles and screen shake weren't quite enough. So I added explosions. For explosions I use objects that draw themselves as a circle and randomly move around. They only live for 2-3 frames. A good trick I learned from The Art of Screenshake is to have your explosion draw as a black circle for the first frame, then as white after that. The contrast from the black and white flickering makes the explosion stand out more.

Level 2 Layout

Then I focused on level design. The first few levels aim to teach the basic mechanics. There is some explanation text, but there are also some tricks used to demonstrate mechanics without text. To demonstrate that the screen wraps, level 2 starts with one reachable gem, and then 4 gems out of reach. You can't jump high enough to get the top ones, so you drop through the platform to collect the gems below. As you fall off the bottom of the screen, you wrap back around to the top and can collect the gems up there.

Level 1-5 layout

The goal with many of the levels was to force you to lower your shield. Level 5 has a couple of gems on the sides of the screen which are blocked by a platform above them. You can't hit these with a jump, so you're forced to collect them by firing the magic missile. You're forced to set up carefully or destroy some fireballs before you can safely shoot at the gems.

Level 1-4 layout

Other levels are set up to force trigger happy players to hold on to their shield. For level 4, there are advantages to both strategies. The level is very simple if you hold your shield, since you can just climb up each side and jump down to collect all of the targets. But if you want a high score, this is a great room for combos. It's much riskier to make shots in this level though because there are a lot of fireballs flying around and there isn't a lot of room to maneuver.

Ghost demo Slimes Slimes 2

I added a couple more enemies next. The first was really simple, I added an invincible ghost which appears after about 30 seconds and slowly chases you. This forces you to finish the levels quickly or else work around the ghost as it slowly chases you.

The other enemy I added was also pretty simple. It's a cute little slime who walks back and forth peacefully. It would be really mean if you killed it. The slimes leave a trail of slime on the floor, which slows down your movement while you're on those squares. This opened up some new possibilities for level design, and led to some of the hardest levels in the game.

Fade transitions Title screen

This all happened Friday night and Saturday. On Sunday morning, I started working with around 8 hours left before the deadline. My goal at the beginning of the day was to get the game shippable. The game needed smoother transitions between levels, title and game over screens, and sound effects. I didn't have all the enemies I had thought of, or enough levels in my opinion, but it was more important to get the game in a releaseable state, so that I could stop at any time and release the latest good version.

For the fade effect, I just copied code over from the Jelpi demo that comes with PICO-8. I trigger the fade on level transitions and on death. When you die I put in a small delay where the game loop continues running before it stops and fades out. This is important so that you have a chance to see why you died and process things before you get thrown into the game over screen.

I drew the title screen in aseprite. Then I followed the directions in this forum post by PICO-8 user 01010111 to convert the sprite to a string which could be loaded from code. I tweaked the decoder to draw directly to the screen. I think it takes a few frames to completely draw the screen, but that's fine for a title screen.

red wizard playing frantically combo demo fire wizard demo

And now it was getting alarmingly close to the deadline. I added a score system and numbers that float up when you score. There's a basic combo system that tries to reward you with bonus points when you fire your missile and destroy more than one thing. I think the combo counter turned out buggy, there are situations where it doesn't seem to reset properly.

Since there weren't a lot of levels, I decided to make the game loop forever like many classic arcade games. When you finish level 16, you're sent back to the start of the game. Your wizard is palette swapped to a new color, the enemies move faster, and the ghost spawns earlier.

With almost no time left, I decided to add the skeleton wizard. I had drawn the sprite for this evil wizard earlier and really wanted to add it to the game. When you are in the wizard's view horizontally, they shoot magic at you, which disables your force field for a few seconds. The code behind this is pretty neat, the force field is moved just offscreen and a counter is set. The same logic that handles returing your force field after you shoot it handles recharging it after the skeleton breaks it.

Ten minutes before the deadline, I drew a few levels with the skeleton wizard and got the game packaged up for submission.

You can play the game on itch.io.