The making of Protect It


The beginning

Ludum Dare comes once again. I didn't have serious plans to join, but with current events happening I saw the LD hype online and thought about joining. I didn't even vote on the themes. The theme came out, and that's nice.

On Friday I thought of several games to fit the theme. The obvious one was a plant growing simulator. I'm sure we've a similar experience of trying to get a plant grow. When I was a kid, I planted a sunflower seed. Imagine my surprise when it actually grew! I cared for it and watered it carefully for about a month, shocked that I could get anything to grow.

The cat ate the plant after about a month. :( I've refused to grow anything ever since.

While that story has some inaccuracies and exaggerations, it's based on a true story, one I think most of us have.

I did not make that game. I also didn't make a tamagotchi remake. I spent Friday walking, tending to my (real!) garden, playing video games, and all other things I've been doing since there has been a pandemic telling me to stay away from other people. While doing those things, I was turning all sorts of ideas over in my head about what game I should make.

I came up with the idea that you are a guard, of sorts. The one you are guarding will just bumble in to situations, but you take the gunfire, walk in to traps, what ever, while your guardee just keeps plodding on. This idea ended up being the game I would make.

Saturday morning, there was a post on the LD twitter account "Only 24 hours left!" I replied "PANIC! I HAVEN'T DONE ANYTHING YET!", still not entirely certain that I would do so.

The Making

Suddenly motivation hit. I started with the music. I had been experimenting with an app on my phone called Kaossilator (quite fun) but that has a certain sound to it that I didn't like. I tried to make nice things but it didn't go. I did use a song I made there in the end scene. I opened up Bosca Ceiol. I made a simple baseline, and I must admit to being disappointed with how the drums came out, but I just wanted a simple techno beat.

When I put this song together, I didn't really know how I would use it. I exported the bass, the drums, and the melody as individual tracks. The drums were actually as two tracks. I had some how thought I would layer them together. I wound up using the base on almost all the levels by itself (using the sound effects from objects in the game to fill the noise) and drums2.wav (loop 6 in the above image) with the base on some levels. The melody track only shows up on one level. I never used all the parts of the song together. I am not proud of the music, it kinda sucks.

In Kaossilator, in time prior to the 72 hours of Ludum Dare, I had made a track. This track ends up being used on the end game win screen.

I put in an animated gif which was a mandala my wife had drawn, mapped to a spinning ball using GIMP, that I had made many moons ago and I don't remember why. To get an animated gif working in Unity, I had to unwrap it in to individual frames, and then concat the images together to make a sprite sheet. I used ImageMagick to do that. Then it was easy to import to Unity, and have the animation automatically created when I added it to the scene.


For some reason I wanted you to the smiley face from the old DOS font, and I looked for it and couldn't find it (it wasn't actually in the original ASCII version of the DOS font, it's in some weird code page), until I ran the Playscii program and I zoomed the image and took a screenshot, and that became "You".

I manually edited the sprite in Gimp to make a sad face, for when It dies.

I made the first level. I have a script for simple 2D movement that I think works well, and I added  to it the effect of pushing It around. It has some strange bugs that I will discuss later, but for the first level, they were not apparent at all, and I ignored them even after they became apparent.

I started creating the walls by merely hitting "new sprite" but could not seem to get the sprite to behave. I eventually made a 4x4 pixel image that became the walls. Since they are solid color, they scaled without artifacts.


Part of the design is that everything should be deadly. That first level just had walls for obstacles, simple enough to learn the rules.

While most music is made in Bosca Ceiol, the death sound was made in BFXR. I didn't fiddle with buttons much, I just hit "Explosion" until I heard one that sounds good.


For the second level, I made a simple canon in Gimp.  You can easily block shots, but It dies if he hits them.


I made a third level. This one to me is the more interesting. The "chomper" traps are images that are half transparent and half solid black. This allowed me to simply scale them without figuring out where to put the anchor, or to come up with a different way to make them go up and down (I could make a set of images in ImageMagick to use, for example). I'm not sure this hack is the best one, but it works. It is noticeable on Level 9 where you can opposite to the chomper trap, and you will be pushed out of the way as it gets to normal size.

I put the first three levels together, showed it to my brother, and called it a night. I had the idea that I would not implement any new mechanics, and just make levels out of these simple mechanics. With this being the end of day 1, I slept thinking about the levels I would make.

On day 2, I made a new level out of the chompers. The next level I made, didn't technically add new mechanics, but it certainly was a new mechanic from the perspective of the player. Then as I'm thinking about what the next level should be like, I realize an awful thing. I confess to my brother. "I need to add a new mechanic, bouncy walls."

My brother did not understand why this was a big deal at all. Some times the arbitrary plans we set out for ourselves are laughable.

It was easy to add the code to make walls bouncy, though I did it in a very hacky way. It was much harder for me to do the art for them. I wound up using Gimp's builtin web button generator. I changed the background and foreground to a shade of green, used "--------" as the text (it does not support blank text in the generator, which is what I really wanted), and that worked well enough.


My bouncy level showed me a new bug I hadn't seen before.

The ball should only be pushed if you are actively going in a given direction (that is, if Input.GetAxis("Horiz") > 0.2f)). But here, we have a random bounce cause the change in direction. Arguably, this isn't a bug at all, this could easily be expected behaviour, but it wasn't expected, I expected the Player to be pushed by It, very slowly, until the Player did something to push It.

With the additional bounce mechanic, I made a few more levels to finish out the game. I also added some background floor textures, originally drawn by my wife, but so miscoloured and manipulated by Gimp that they aren't recognizable anymore.

I looked for a tutorial on how to make a "boing" sound in Audacity or any other toolkit, but unfortunately I did not find one. Searching through my archive of the Sonniss sound effects did not result in any "boing" sounds. I finally got the idea to go to Open Game Art and do a search, resulting in a good sound.

With that, and some cleanup, I submitted the game, well within available time. Due to me using lots of assets from other sources, finishing on Monday rather than Sunday, as well as assets made previously and for other game jams, I joined the compo.

What went right, what went wrong?

I did some things right; I made the speeds of the player and It to be adjustable. I did some things wrong, in retrospect, I really wish I made the walls prefabs. Most everything else is a prefab, so when I fix things, they are fixed through out the game with no adjustment. There is very little code in this game, made possible by using the Unity 2D physics system.

There are major bugs in the pushing system. Not only the bouncing issues mentioned above, but I tried to make you push It "in what ever direction you going". However, if you are going diagonal, you will push right/left before you push up/down, due to the order in which I check things. I am struggling to figure out the best way to fix this. My best idea is to see which way It is going, and to push the opposite direction. This might cause it to follow a diagonal so long as you are pushing diagonal, which is already current behaviour.

What other issues have I had? The most notable issue is that Unity's UI system is still a pain to keep things looking good at various resolutions. I set it to 800x600 and set itch.io to use that resolution, but this is something that I have struggled with ever since I've used Unity. 


What was the feedback?

Unexpectedly, mostly positive. It seems people either don't have the patience to keep playing, or find it oddly satisfying to beat the puzzles. People strangely seemed to like the music a lot more than I did, though I doubt it will any awards or even a good score in the ratings. 

The number one complaint is that you had to be holding down the controls the second the level starts to be able to survive. Some said that it's not a big deal, but I sympathize with them. A solution to this would be to have It come in to the screen a  second or two after the level starts.

Some mentioned inconsistent graphics. I don't want to say "I don't care", but like the music, I'm coming up with graphics that will do in short time, rather than trying to make everything look good.

One person noticed I did not apply any physics materials to my objects! It's true. I had forgotten that I could do such a thing.

What next?

Normally, I write LD games and forget them. However,  a friend of mine asked about porting it to an AppleTV.  I don't have an AppleTV, and didn't really know that there is an app store for such a thing, but I compiled the code for AppleTV, and saw it running on my simulator. My friend got it running on his actual device. This has put in my mind a post-LD version, and attempting to make a commercial game of it. Mind you, it would involve redoing almost everything, but there is actually very little code (the fewer bugs to deal with!), and it would be a very unlikely to make any profit. It would almost be unable to port to the phone, and charging money on PCs (and on TVs!) would be difficult. I would likely redo it for i18n even though there is almost no text, fix the controller bugs and make some of the other changes. The art and music would need to be entirely replaced.

However, I can see it, whether freely available or for a fee. I could make 50~100 levels, and perhaps the first 10 levels could be demo. With my job on hold until the pandemic settles down, I have the time to do it. This LD is going better than my other game jams, so perhaps you might see it!

Files

Protect It 1.01.zip Play in browser
Apr 21, 2020

Leave a comment

Log in with itch.io to leave a comment.