Bomb Squad Day One

With the first day of Ludum Dare 27 almost complete, I have made a good start on my entry Bomb Squad. The objective is to disable as many bombs as possible before they explode. When a bomb appears, you have 10 seconds to disable it.

bombsquad02

I originally planned to have the player enter a sequence of wires to cut to disable the bomb. Implementing this wouldn’t be too difficult, but the problem would be displaying the wires to cut to the player. I would rather not have to display a sequence of buttons over the bomb, but trying to display small wires on a bomb would make it too hard for the player to see the sequence. I thought about having a popup view display whenever the player gets close to the bomb, which would show the sequence. However, I decided for now just to color the entire bomb with just one color that needs to be disabled. I think this is a good design decision, since 10 seconds is not a lot of time to run over to the bomb and disable it, especially with multiple bombs active at the same time.

The controls are simple, with the control stick and arrow keys moving the player. Once the player gets close to a bomb, the countdown number will turn green, indicating that it is the bomb that the player is trying to diffuse. If the player enters the correct color, then the bomb is diffused. The mapping between colors and the game pad buttons and keyboard keys are displayed in the upper right corner of the screen. If the player selects the wrong color, then the bomb will explode and the player’s suit will take damage. If the countdown reaches zero, the player will also take damage if they are near the bomb.

bombsquad03

The amount of damage the player will take is dependent upon how close they are to the exploding bomb. If the player is directly on top of the bomb, then their suit will take 20% damage. The player takes 2% less damage for each world unit they are away from the explosion. The player will also be thrown backwards from the explosion, using Unity’s create explosion force method.

Last night, I created three tracks using Garage Band on my Mac system. In my opinion, it’s a little more difficult to use than Pxtone Collage, but it has better instrument samples. However, most of the instruments sound like John Tesh new age music. I also recorded some voice samples, which announces the title, game over, and level complete. Using Bxfr, I created sounds for the bomb exploding and a beep for disabling the bomb. I’ve always had problems getting 3D sound working, but I was able to get it to sound right by changing the volume rolloff in Unity from logarithmic to linear. Now explosions on the left will come out of the left speaker, explosions on the right will come out of the right speaker, and the volume will correspond to how far away the player is from the explosion.

So what’s left? The terrain textures are really blurry, so I really need to fix those. I haven’t had this problem in the past, so I think it must be due to using as 1024×1024 texture size. I will try recreating it will a 256×256 texture. I tried changing the tiling options for the texture, but it didn’t help. I would also like the touch up the player model, since I think the arms are too long and the hands are too big. There also needs to be more contrast in the suit, since it’s hard to tell the difference between the dark blue and gray. Also, the model needs to be scaled down in Blender to about half the size, since I have to scale it down in Unity. However, I learned that any mesh or scaling changes in Blender can really mess up the model, especially if it has already been rigged, animated, and texture mapped.

I would also like to add various “junk” around the play area (like cars, signs, and trees), which can also be damaged by the bombs when they explode. There will be a dollar value attached to each item, and after each level the player will get a total property damage value. The objective will be to keep the property damage value low. However, the physics engine started acting strange when I added a few test objects, by throwing the player up in the air when the player collided with an item. Overall, the player model seems to be stiff as well when it is affected by an explosion, probably because I’m just using a simple box collider for the player. Finally, I need to update the explosions, since I am just using a default Unity particle system right now. I would also like smoke to appear after the bomb has exploded, which could make it harder for the player to see the game area, which would give extra incentive to not let bombs explode.

One other problem is still passing data between scenes in Unity. This is a problem that I’ve always had with Unity, and have solved it before by passing the persistent data to the DontDestroyOnLoad method. However, it is not possible to associate that object with the newly created objects when a level is loaded. I’ve heard that it is possible to pass data between scenes using a player preferences object, so that may be the route that I take to solve the problem. This will be essential to pass the game score data to the level complete scene, as well as incrementing the level number after a level is complete.

 

Bomb Squad

Bomb Squad
Play online

Overview

This was my entry for the Ludum Dare 27 competition.

Evil terrorists are spreading bombs across the the city. These bombs are set to explode in ten seconds. It is your job as a member of the elite bomb squad to disable them and save the city!

Cut the wire that matches the color of the bomb to disable it.

Cutting the wrong wire will make the bomb explode.

Your suit will take damage from exploding bombs. When your suit reaches 0% the game is over.

Exploding bombs will damage objects, which will add to the property damage. Try to achieve a low property damage value.

 

Post Mortem – A Culmination of Learning Experiences

This is my second time participating in the official Ludum Dare competition. Overall, I feel like my skills with Unity have significantly increased since the last competition, when I submitted Amish Brothers. Since the last competition, I have submitted a game to each mini-LD, and each game developed taught me something new about Unity.

This time around, the theme was “10 seconds”. My idea was a game where you play as a bomb squad technician, where you have 10 seconds to disable each bomb. If the bomb explodes, the objects around it will be propelled away and add to the property damage value. The objective is to keep the property damage as low as possible, while avoiding bomb blasts which damage your suit. If your suit reaches zero percent, then the game is over. Additionally, you must “cut the wire” that matches the color of the bomb, otherwise the bomb will explode and you will take damage. For more details on my design decisions, see my Bomb Squad Day One entry.

Bomb exploding next to a wall

For this game, I knew I wanted to use Unity’s physics engine for handling the explosions. I first started learning about Unity’s physics engine when I developed Earthball for the mini-LD42. When the bomb explodes, it applies an explosive force to all of the objects in the game, including the player. I found that this starting causing problems when there were over about 600 objects in the scene. When the objects were exploded and scattered everywhere, the slowdown didn’t occur. It was only when the objects were stacked, which I believe is because when the objects are stacked, they are continually colliding with each other, which requires a significant amount of processing power. The player is also affected by bomb blasts, but I feel that if I learned how to use the “ragdoll” physics in Unity, the effect would have been much more impressive. Currently, the player just has a cube bounding box, so the player looks very stiff when thrown by an explosion.

The ground is just a terrain object (like I used in the test Giga Guy game that I developed), but I always have issues with my models falling over when going up the terrain, therefore I just left the game area flat. However, I was able to use the blended terrain textures to make the ground look much more pleasing.

I used Blender again for rendering my models. There were really only two models that are in this game, which are the player and the bombs. From my LD27-warmup game North Avenue Adventure, I learned how to properly project my mesh to a 2D layout, and how to modify the unwrapped vertex “islands” properly to generate an image layout to be textured in Gimp. I am happy with the model that I created, but I would like to go back and add more details later. However, I found that it can be difficult to modify a model in Blender once all the modifiers (mirror, subdivision surface) have been applied and the armature added. I also think I could have done a much better job on the bomb model, since it is just a stack of cylinders. A spark particle system on the bomb would also be a nice touch.

My mini-LD43 game, Marching Band Simulator 2013 taught me more about composing music in games. However, for Bomb Squad I decided to go with Garage Band on my Mac laptop for composing the music. In my previous entries, I have used PxTone Collage which is a great tool, but the blips and bloops it uses cannot compare to the music that can be created with Garage Band. For the complete soundtrack, please visit my Sound Cloud page. The only problem with Garage Band is that I had to export my songs to iTunes to get the audio file, and then copy it over to my development system. It is a bit of a hassle, but I think it is worth the extra effort.

Another game I created in Unity for #1GAM was called Genetic Disorder, which is where I learned how to make the text meshes for the title screen using Blender. It’s a fairly simplistic process, but the number of vertices must be reduced otherwise the model file size will end up being huge.

Text mesh zooming in on title screen

For the 7dRTS challenge, I created a game called Ninja Squad Commander, where I learned many more Unity tricks. First of all, it taught me how to center a text object over a model, and how to make the 3D text sharp (by default the 3D text will be blurry). This was used in Bomb Squad to display the number of seconds until explosion over each bomb. In that game, I also learned how to make detailed particle systems, like the fire effects, using Gimp to create the fire texture using a gradient and IWarp filters. The game also taught me how to attach lights to particle systems at runtime, to give the fire a glowing effect which can be seen on objects around it. Both of these effects were used in Bomb Squad at the location of an exploded bomb. When I was developing the RTS, I also learned how to determine the distance between two objects in 3D space, since using multiple physics colliders for different events can cause problems. The 3D distance calculation was essential to determine how much damage the player would take from a blast, and how much property damage is received by an object. The distance calculation is also used to determine if a bomb is selected to be disabled. My 7dRTS game also taught me how to make a shadowed font from a text object, which made the static text in the game look much better.

The one new feature that I added that I hadn’t implemented in a previous game is the mini-map. I felt that it was needed, since the player can’t always see the entire game area, so there would be bombs hidden to the player. That problem could be helped by adding code to fix the camera behind the player, so that is something I will look into for a future release. I think the mini-map would still be beneficial, but some players noted that it makes the game a little too easy, so I may eventually take away the bomb color on the mini-map.

Honestly, I can say Bomb Squad wouldn’t have turned out as good as it did if I hadn’t created all of those other smaller games after LD26. One important factor in being successful in Ludum Dare is knowing your tools and all the tricks before the competition starts. Trying to learn new technologies during the competition is a recipe for failure.

Follow me on Twitter at @GaTechGrad and visit my website at www.levidsmith.com

Videos

 

 

Released

Blocks of Nibiru

Play online

 

Blocks from from Nibiru are falling into our dimension. The blocks arrive in shapes of four and stack on top of other blocks. Save the world from destruction by destroying the blocks before they reach the top of the dimensional plane. Destroying blocks will periodically award bonuses for your ship. Be careful to watch the heat meter above each ship, as overheating will require your cannons an extended period of time to cool off before you can shoot again.

In other words, the game is a cross between the space shoot-em-up genre and falling block puzzle game genre. The gameplay is inspired by games like Gyruss and Tetris.

Bonuses

  • Red – Multi-shot cannon (upgradable twice per ship)
  • Cyan – Heat Reduction (upgradable four times per ship)
  • Magenta – Extra Ship (max four ships total)
  • Green – Bomb (max of three)
  • Yellow – Increased Speed (upgradable twice for all ships)

Controls

  • Left / A key – Rotate ships clockwise
  • Right / D key – Rotate ships counter clockwise
  • Up / W key – Move ships in
  • Down / S key – Pull ships out
  • Space / Left Mouse Button – Fire cannons
  • Right Mouse Button – Use bomb

Post Mortem

After five years and sixteen consecutive Ludum Dare entries, I don’t know if there’s much for me to say in a post mortem anymore.  Honestly, I don’t feel like my game development skills have gotten that much better.  However, I feel like what I have previously done can be done in a much shorter period of time.  What used to take me the full 48 hours to accomplish, can now be done in the first day.  That leaves me a lot more time to test and tweak gameplay difficulty.

The idea for this game came from the story about a hidden planet called Nibiru, which is supposed to cause the end of the Earth.  I had originally envisioned a fully functional falling blocks game like Tetris with AI, but I settled for just getting the block stacking working.  The objective is to prevent the blocks from getting to the top like in Tetris, but you have to shoot them instead like in a space shoot em up.

In most of my previous Ludum Dare entries, I only had one or maybe two gameplay mechanics.  I believe Blocks of Nibiru had the most of any of my previous entries.  Below are most of the mechanics I was able to implement for this game.

  1. Multiple ships
  2. Upgradable cannons
  3. Gun heat / Overheat cooldown
  4. Speed upgrade
  5. Orbital movement
  6. Block stacking
  7. Bombs to clear blocks
  8. Collectible powerups

I really started learning how to place objects in polar coordinates when I made my Easter Egg Hunt game last month.  In that game I laid out the eggs in a circular fashion, using the angle as the interval and the radius as the random value.  Using the angle and radius mapped really well to the horizontal and vertical Input Axes in Unity.  I was amazed at how well it controlled in my game.  Then I remember this had been done before.  It was a game called Gyruss that I played on the Nintendo Entertainment system as a kid.  However, Gyruss did not have the ability to pull in and out like my game.  It may not seem like a big difference at first, but moving along the radius does really help when you’re trying to track down a powerup or trying to spread out a multi-cannon shot.

Since my ship object was a prefab, it was not difficult to make multiple instances of the ship.  Placing the second ship was easy, because I just added 180 degrees to its angle.  The third ship was a little more difficult.  I could not keep the ships evenly spaced (120 degrees apart) without moving them around, which would be awkward.  Therefore, I just added the third ship to be 90 degrees between the first two ships.  Then the fourth ship would just be 270 degrees away from the first ship.

For the cannons, I just modeled three red cylinders and placed them at angles at the front of the ship.  I tried not to make the spread two wide, but not to narrow as well.  The first cannon shoots directly forward.  To keep symmetry, I decided that when the first upgrade is applied, the two angled cannons would be enabled.  Then on the second upgrade, all three cannons would be enabled.  Again, since the ships were instanced, it made it so that the cannon upgrades would be unique for each ship.

As I was playtesting the game, I noticed that an overheat / cooldown system was needed.  I didn’t want players to keep mashing the shoot button forever with no penalty.  I wanted players to feel like there was importance for when they take a shot.  Therefore, I added the heat percentage to the ship instance.  When it reaches 100% (it’s actually stored as a float value), then the player is locked out from shooting with that ship for a period of time.  I used my harmonica to make the beeping sound when the ship overheats, so that there is audio feedback.  I probably should have added a smoke effect or something when the ship is overheated.  The heat reduction powerups were made to allow more shots before the ship overheats.  Looking back, I would have made fewer levels of heat reduction, like just two so that when the powerup is collected it feels like it makes more of a difference.

The speed upgrade was not difficult to implement.  I just increased the speed instance variable for the ship.  However, it was not possible for each ship to have a unique speed, because that would eventually result in ships overlapping and give it just general janky feeling.  So I decided to have the speed upgrade applied to all ships, which kept the symmetric spacing between all of the ships.

The bomb upgrade was fairly simple to implement.  If the bomb counter is greater than one, then decrease it and delete all block instances currently in the game.  I used a pizza pan and lid of a pot to make the sound effect, sort of like clashing two cymbals together.

The powerups were made with a six sided circle in blender extruded out to make a 3D shape.  Then I duplicated and made a longer and smaller one to cut out the center using the Boolean modifier (I always forget if it’s difference or intersect).  The voice that plays when a powerup is collected is just my voice with Audacity’s vocoder applied.

I guess the one thing I did learn from this game was how to rotate a skybox in Unity.  I took a walk at the local park early Sunday morning, and took a picture of the sky.  Unity now has an option to make a skybox out of a panorama picture, instead of having to put together six sides of a cube.  The important thing is to make sure that the picture is seamless.  I was able to do that in Unity using the Make Seamless Advanced plugin.  I also took pictures of some rocks around the house that I used for the block texture, and the side of a tree that I used for the background board plane.  The ship was textured with a picture I took of the metal on the side of my air conditioner.

I used the Blender cell fracture plugin again, for making the blocks explode into multiple pieces.  I had to turn the fragment number down.  I think the default was something like 100, so I turned it down to 20.  The one issue was that I had to remember to set the animation to legacy for the explosion effect to apply.  As usual, I put the explosion into a separate prefab that gets instantiated when the block is destroyed, so that the block is immediately removed from the game logic.  It also allows me to put the destroy sound effect (which was just me clapping my hands in front of the microphone) in the explosion prefab, so that continues to play after the original block is destroyed.

The music was composed in GarageBand again.  This time I used my new MacBook laptop, which is much more speedy than the one I previously used which was about six years old.  I really didn’t do anything out of the ordinary for the music this time.  I just made a couple of melodies and switched them between instruments, and used one of the standard generated beats.  I did increase the pitch of the music as the block stack gets higher, which makes it feel like a greater sense of urgency, similar to how the old Tetris for GameBoy did the music.

Looking back, I think there were a few things that could have made this game better.  I wish I had put tail renders on the bullets.  The explosions could have also had lighting effects.  However, having too many point lights on at the same time can cause problems.  I think after eight or so point lights, they just start getting ignored.  I could have at least put a point light on the ships, or a flash of light when the cannon is fired.

I also wanted to have the skybox change color as the player progressed through the game.  I couldn’t figure out how to get a handle on the color of the skybox.  Overall the game just like it has too much orange.  I probably should have made the score text, level text, and bomb display be larger and a different color.  The 3D text model on the title screen could have been a different color as well, because it’s really hard to read especially in thumbnails.

I guess that’s it.  I used to say that the day when I didn’t learn anything new, I would stop making games.  There are some new things that I do want to learn in Unity, like the new shader interface.  I just feel like I’ve moved out of the learning phase and into the making things more efficiently phase.

 

 

Released