Earlier this month I (partially) participated in Ludum Dare 31. I say partially, because I had a lot of family stuff going on that was going to take up most of my weekend, as I tweeted earlier in the week. But on Friday night after putting the kids to sleep I checked the theme and saw that it was one of the ones I had actively voted against: “Entire game on one screen”. So I was like, “Well, I guess it’s for the better; I didn’t want that theme anyway, so this’ll make it easier for me to ignore the compo/jam.” But then ideas started pouring into my head and some of them seemed like they were pretty good, too! I sat there, unable to sleep as I rolled these ideas through the tumbler over and over until I landed on an idea that not only sounded good, but I had a pretty good handle on how to do it and it might even be able to be completed in the < 24 hours I’d be able to commit to the jam.

The Game For the Jam

The initial game idea for the jam was pretty simple. It’s a twin-stick shooter (aka arena shooter) similar in look and feel to Geometry Wars but with an Ikaruga twist. The sub-genre in and of itself seemed like a very pedestrian and obvious choice for the theme since games of this sub-genre typically occur entirely on one screen anyway. I figured I’d make all of the menus for starting and restarting the game objects that you shoot, to take it that extra step toward the theme, but still, a Geometry Wars clone is not a particularly interesting game jam entry. So the other, more interesting bit, was to make the game spawn all of the enemies and power ups on its own, all roguelike-y. My idea for how to do this was to use the lasers that the player shoots, when two lasers collide they have a random chance to spawn a power up or an enemy. Then I wanted to make it so that the player could have some input into this, or affect the randomness somehow, so I came up with the ship and shield colors idea, which would be where the Ikaruga twist comes in.

The player can change the color of their ship through the three primary colors. They can also, independently change the color of their shields through the same colors. The combination of their ship and shield color determine the color of the lasers they shoot: blue ship with a yellow shield shoots green lasers. This combination also determines the amount of damage they take when being hit by a laser. When lasers collide the colors of the colliding lasers determine which pool of enemies or powerups the game will choose from if it determines that this collision will generate anything at all. So an orange and a purple laser colliding might spawn the Spread Laser power-up, Reflect Shield or EnemyA or EnemyC, but a green and blue laser collision might spawn a Health Orb, a Time Warp orb, or EnemyB or EnemyC, and so on.

Progress Made During the Jam

I decided to go with Löve2D for the game, since I’ve worked a fair amount with it in the past and felt like I could get up and running pretty quickly with it. And I was, the more I play with that engine the more I really like it. It is the perfect combination of minimalism and practicality and it just lets me get in there and make things my way without imposing much on me. And its docs are really well done and helpful, I can almost always figure out exactly what I need to do to make something in the engine do what I want it to in a very short amount of time.

The one thing that Löve doesn’t have that some other 2d frameworks have is easy to use collision detection. They have a Box2D wrapper, but that’s really way more than what I needed for this game. As such, a large chunk of my time during the jam was spent doing collision detection and vector math. I’m actually really happy that Löve doesn’t have this as this time my attempts at learning all of this vector math and trigonometry for collision detection actually stuck and I really feel like I learned something; like I got over a hurdle that I’ve stumbled over many times in my past. I found a lot of help on this subject in these videos and this cheatsheet.

Another thing I spent a lot of time on during the jam (and ultimately ended up removing after the jam, unfortunately) was the color combination code. As you may know in the RGB space adding yellow and blue does not get you green (it gets you white). I wrote code to convert colors to CMYK then do the combination and then convert back to RGB (based on this Stack Overflow answer). I ended up removing it later on because with only 6 colors it makes more sense to hand pick the colors and then do the logic of combining them manually so that I end up with better colors overall, as the algorithm used kinda muddies up the colors a little bit.

As I said before I didn’t have the full 72 hours to commit to the jam due to other obligations, but I was able to carve out a couple of 3 hour chunks over the weekend, and then took the day off from work on Monday to try to finish. So in all, I had just under 20 hours to put in to the game. This was, unfortunately not enough for me to get to a place where I felt I could submit anything. At submission time I had the ship on the screen and lasers bouncing around and colliding with each other and the ship, but I had no enemies, no power-ups, no scoring, no menu system, no sound (effects or soundtrack), basically no game, just a barely functional prototype. But it was a great start, a solid framework to start hanging the fun ideas for this project off of. I created a tag on the repo to mark my progress at the submission deadline, if you’re interested.

After the Jam

So I’ve been all super inspired about this game idea since the jam and have thusly put quite a few hours into improving it over the past month or so. The only thing from the list of things I didn’t have at the submission deadline that I do have now is scoring. Which I added about 1 hour after the submission deadline. But I have spent a lot of time tweaking and improving things to clean up that “get it done quick” code that I didn’t want sticking around in a more permanent project. Also: bug fixes and memory leaks.

I spent a fair amount of time getting a Bloom shader into the game for the lasers and the shields to pretty it up a bit. This was the first time I’ve ever done any GLSL stuff and it was a great learning experience. I’ll do a full post about that in the near future. I’m pretty darn happy with the look as it stands, I still need some font work and a better ship sprite, but overall it looks pretty damn good for programmer art.

I’ve added keyboard controls since the jam as well. They suck, but that’s the nature of this style of game, you pretty much just need to have a gamepad to really make it feel right.

The other thing I’ve spent a lot of time on since the jam is nailing down exactly what I want actually in the game, and I still haven’t finished that process! I’ve got a pretty good roadmap in my issues list on the repo for what needs to be coded up next, but I think ultimately the rest of my game design decisions are going to have to be made after implementing some of the ideas, trying them out, and going from there.

During the jam I never actually landed on a usable name. I have since done that, as well.

The Name

The color combination thing kind of made the player ship seem like a prism to me, in fact when I went and looked it up on wikipedia the following quote described what the player ship was essentially doing quite nicely:

A dispersive prism can be used to break light up into its constituent spectral colors (the colors of the rainbow). Furthermore, prisms can be used to reflect light, or to split light into components with different polarizations.

So that’s how I ended up on the name “Prism”.

Now What?

My issues list gives a pretty good idea of where I want to go with the game, but what I’m focusing on in the short term is getting the power-ups and enemies spawning so that the game really starts to feel like a game! I’ve had a bit of Analysis Paralysis the past week or so and keep putting off doing the power-ups because I’m having a hard time figuring out how best to implement them. It’s a much more difficult problem to solve than I thought it would be! I may end up writing a post about that in the near future as well, once I settle on how to do it and get it done.

I’ll get back to updating this site on a more regular basis again now, and I’m sure Prism will be a frequent topic of these posts in the near-term at least.

Posted by Ryan at