For the past 9 months or so, I’ve been looking for inspiration to work on building my own game again. While I have been spending unhealthy amounts of times playing anything and everything in sight trying to figure out what game development lessons I could learn (sure, let’s call it that), I needed to find the motivation to put my now very dusty coding hat back on and start building my own worlds. Finally, back in February I went to visit my sister and her family to celebrate the birth of my newest nephew, Q. During this trip, his older brother, Bash, and I had the ultimate gaming sleepover playing NES Classic and SNES Classic until 1 A.M., which was far far past my bed time but not his since he was absolutely entranced by the old school action unfolding before him. With his sixth birthday fast approaching and his love of video games growing by the day, the path to my next game was clear. I’d spend the next several months building him his own personal Super Mario and hopefully ruin all future birthday presents.
A Brief History of Pwned and Operated Studios
In the proud history of the various incarnations of Pwned and Operated Studios, I have now produced three video games (not counting the 50 or so I fake built in Game Dev Story). The first, My Mess Their Kitchen the Game, is an ode to the road I took to get to Charleston as told through the passage of time in my now defunct cooking blog. It is a strictly browser based RPG built in entirely too many lines of HTML and jQuery over the course of about 6 months that was vital in teaching myself how to code prior to my time as a professional software developer. Even four years later and with a lot more coding skills under my belt, it remains a charming little 20 minute adventure to revisit every now and then especially for the weirdness that was my first attempt at pixel art.
Game number two, while far more technologically advanced, was also sadly far less fun. Octets was built in Unity using C# and features 20 levels revolving around the basic concepts of covalent bonding in chemistry (yes, I will gladly take your money now). Each 4×4 puzzle contained increasingly complex molecular set ups where you were trying to bond neighboring atoms to give each a full octet as quickly as possible to earn all important stars. While using my chemistry background for a ruleset helped me quickly build various puzzles, it also meant the whole things wasn’t all that fun. Eventually, following about 6 months of work and after starting a new, less stressful job, I gave up on the project in the hopes of one day returning to game development with something far more enjoyable. On the plus side, at least this got my feet wet in Unity and showed me it would be possible to build much larger scale games. If you are interested in experiencing the puzzle madness you can download it for Mac here (and hit me up if you want actual instructions on how to play. It’s not at all complicated…).
My masterpiece, however, would be my third game – Super Bash Bros.
With the clock ticking at almost exactly two months to go until Bash’s birthday, my latest development cycle began in much better shape than the previous two entries in the Pwned and Operated catalog. At least I knew what editor (Unity) and code base (C#) I’d be using even if I’d need to brush up on those skills again. For the first two weeks or so, I redid Unity tutorials that I had found interesting and helpful in the past. It was a good intro back into the structure and syntax I’d need to be using, and it was also useful for generating mini-prototypes that I could then build on to see what mechanics worked. Plus it introduced me to free assets that would be essential for level building.
The next two weeks would be spent trying out every different kind of power-up I could think of that I might want to incorporate into my own game. Mostly, it was me breaking stuff or making super janky things, but it was the start I needed to get the ideas flowing. With a basic template in place, it was now time to move things out of the prototype tutorial world and into my own game with a month to go. This process of super breaking everything while setting up a new project, proved extremely helpful it getting me to truly understand the inner workings of Unity instead of blindly following tutorials. It may have taken three days to get things functioning like normal again, but it was worth it.
The Trello Board!
As a project manager by day, I knew the importance of setting up a series of functional requirements and tracking the project’s progress, so I set up a nice shiny trello board where I could brainstorm on what was needed and get the sweet, sweet satisfaction of dragging things into “Completed”.
Now that I had a fresh and semi-working project, it was time to fill it up with levels. I had come up with a basic outline of 6 potential level mechanics, and I set about building primitive versions of each. Thanks to the handy free assets I acquired from one of my tutorials, getting levels spun up was relatively quick thanks to convenient 1×1 blocks for most of my platforms.
Intro Level – Fast Power-up
I needed a way to slowly introduce my nephew into the game world, so I decided the first level would be relatively straight forward. After jumping over increasingly large gaps and up a hill, you would then find a power-up to boost your speed to cover even greater distances. In honor of the fastest video game icon out there, the power-up was designed to look like Sonic the Hedgehog’s shoe.
It was here that I’d also introduce my first real coding challenge – moving platforms. I spent multiple nights stuck trying to get moving platforms to work as expected (that is you not falling through them immediately). I could get them to work by parenting the player to their game object resulting in the player essentially being stuck to them with only the ability to jump off, but eventually I was able to find a solution online for an offset adjustment system that allows free movement along a platform.
Gravity Switching World
The next great idea I had (read: decided to steal from Cuphead) was what would happen if your power-ups altered the flow of gravity. The actual concept was pretty simple since I already had a custom made gravity modifier meaning all I had to do to reverse things was multiply it by -1, however, movement would need to account for the reversal so after several hours with a character stuck in the air unable to move, adjustments to tracking of the ground normal enabled smooth transitions between up and down in what I think is my best and most challenging level in the game.
This is when working on the game really clicked for me. I was almost ready for bed when I decided to challenge myself to make a world full of portals. Within an hour I had a working solution where each portal had a pair that you were quickly transported to. The only real adjustments that had to be made the following night were optimizing so that you exited the portal in the direction you were traveling when you entered its partner and slight adjustments to the distance you appeared outside of the portal to prevent getting stuck going back and forth.
I knew I wanted to play up the idea of my nephew being a new big brother, and the best way to do this seemed to be by honoring the OG Super Mario. In this level, I built a trademark infringing mushroom power-up (not pictured in the video) that makes you big and a series of boulders falling down several mountains. If you’re big when you get hit you revert to normal sized, and being hit while normal would cause you to have to retry.
Several fun challenges existed in getting this to work including placing triggers throughout the map to set certain boulder spawn points into action when you reached a new location and finding spots to destroy boulders once they were well past you to ensure I didn’t use up too much memory. While not the most exciting level, it is probably the most technologically advanced one.
I assumed this would be the easiest to build as it would simply require me to create slippery materials. Unfortunately, my reliance on kinematic rigid bodies to control my character meant the slippery platforms had no effect. Eventually, I discovered the usefulness of dynamic rigid bodies for these types of levels to produce the desired roller coaster sliding effect. Additional difficulty came from the free ice platforms I found that weren’t neat 1×1 blocks like I was used to forcing me to try to do math while placing them. The end results were fast and fun, but I do wish running on the ice was performed a little better.
The Final World – Gliding
Initially, I wanted to make a bouncy level, but after seeing how the Ice World turned out, I knew I needed something more. Finding a way to incorporate teamwork between both brothers seemed like a fitting way to end the story, so I came up with a gliding mechanic where the little brother uses his diaper to slow your descent. A lot of tweaking was required to get something that felt good but by altering the force of gravity during gliding and your maximum speed I was able to get a pretty convincing effect going.
A central component of any multi-level game is the game manager. This persistent game object does not get destroyed when you load a new level allowing you to manage things like score tracking, saving (which I set up to happen automatically after each level with code I had from Octets that I think originated from the second method in this video), loading, and popping frequently used UI like game over or success screens. A good tutorial on game managers can be found here.
Aside from having to look through tons of assets to find even semi-usable music and sound effects, setting up a Sound Manager was fairly similar to building a game manager and came pretty quickly. I set up a variety of songs to play depending on the screen you were on, and would randomly select from 3-4 versions of sound effects for power-ups and coin grabbing to add variety to the mix. The music will definitely drive you crazy after about 10 minutes, but it was far better than silence.
One of the trickier aspects of optimizing the game was getting the camera to work properly. Unity’s built in camera does a pretty decent job once you add a fairly standard tracking script so that it follows your player. From there, I just had to add a slight offset to the camera, so it wasn’t centered on the player. This offset was different depending on the level layout to give you the best view of what was ahead of you.
The Gravity Level added a unique challenge to the camera configuration as a really jarring movement would happen whenever gravity reversed itself. By using a Deadzone camera (like those found in Mario where you can move slightly before the camera does), I was able to smooth this out quite a bit.
Up until relatively late in development, the game was being controlled purely with a keyboard, which felt super unnatural for the genre and would definitely feel out of place for a six year old. Thanks to a really handy video I was able to adjust the game to be easily controlled by a PS4 controller attached to your Mac. In the end, the final controls (for reference in case you choose to play it) became:
This was perhaps the most time consuming single step of the entire production. I had a great basis to start with from the free assets given to me in a Unity tutorial, so from there it was a matter of acting like any big wig in charge of production and whitewashing a character of color to fit my needs. For the most part, this consisted of pixel swaps along with some hair adjustments to make the character look more male performed in the same program I used back when creating My Mess Their Kitchen: The Game, Piskel.
With each new sprite updated, the process got faster and faster, but overall it took the better part of two days of production. And once it was all done, I still had to make a second sprite sheet for the final level showing baby Q in Bash’s backpack and a new animation for opening the diaper glider. It was a magical evening of copying and pasting slightly different disembodied baby heads, but I was pretty pleased with the end result that made the game feel a lot more like my own and hopefully added a lot more magic for the birthday boy.
Additional pixel art was created using Pixelator, which allowed me to quickly turn real photos into pixelated versions for some title menu and end credits needs.
Once my new sprites were created, I just had to replace the old ones in each animation. Since they were all in the same order as the original, this was a fairly quick process. Plus Unity’s Animator Override Controllers made setting up the second set of animations for the final level’s combined brothers sprites super simple since all transitions/states could be reused and simply replaced with the updated sprites. Even crafting the new animation for gliding was fairly easy to do by following the patterns set in the existing controller and adding an “isGliding” boolean to track it all.
Flappy Bird Mode
When I was done building the levels and had played through each 50+ times, I started to worry that there wasn’t enough material in the game. At this point, I could run through the full game in under 5 minutes (a figure sure to take much longer for a 6 year old), but I decided to incorporate an infinite scrolling version of Flappy Bird using the little brother’s diaper to provide the upward burst. This hour and a half or so of effort could in theory add unlimited playtime to the game and several more copyright issues if I tried to profit from this game in any way. If you’d like to make a Flappy Bird style game in surprisingly little time, there’s a great tutorial here.
Making a Build
With all my levels added in the proper order to Unity’s build editor, I hit build and prayed nothing major would end up broken. Aside from a minor bug I found and quickly fixed where the “New Game” button would sometimes fail to load, the build was actually a huge blessing as it resolved a lot of the weird issues with colliders I was experiencing while testing in the editor itself meaning my character was no longer getting oddly stuck inside of platforms, which I considered a huge win.
Play Testing and Final Adjustments
By this point, I had played each level well over 50 times and could beat it with my eyes closed, so I knew I was pretty blind to any criticisms especially surrounding game difficulty. For a fresh perspective, I recruited my old roommate Kevin and several coworkers to try it out.
The feedback was illuminating. One of the weirdest, most difficult parts for anyone was at the start of the first level due to an oddly placed slope near some tricky platforms. Once I converted the slope to steps, that beginning part played a lot more smoothly allowing for a more welcoming introduction to the game world. Additionally, the Gravity Level was clearly the hardest, making it an strange choice for Level 2, so I changed the ordering around replacing it with the Ice Level and placing it fourth. I also added a few platforms to some particularly tricky sections in several levels to make falling less likely and shored up a few hidden paths that could lead to getting stuck outside the game area that one of my coworkers was an expert at locating.
With all this completed at 11 pm the night before Bash’s birthday, I made one final build, tested it, and emailed it along to his parents. From there I poured myself a nice glass of whiskey and enjoyed my accomplishment, knowing there was still more I would like to add.
Upcoming DLC – What I’d Do Next
Without the tight deadline and to make the game a little more user friendly and fun there are a quite a few things I am hoping to build in the coming weeks.
One of the biggest difficulty barriers to my nephew will most likely be the lack of checkpoints meaning he’ll have to complete an entire stage without falling to move to the next one. The concept of setting up a checkpoint itself should be relatively straightforward. If you pass a checkpoint, a boolean should trigger that makes the player and camera load to a new spot near it whenever a retry is initiated. The only complicating factor is that the scoring system works on coins gathered alone, meaning I’ll want to set up a barrier that you cannot pass if a level loads via checkpoint and some other minor adjustments, so you can’t double collect coins.
Similar to the post-game Flappy Bird mode, I’d also like to open up a level select where you can pick whatever level you want to play and attempt to set a high score for that particular level. This will likely involve some minor menu tweaks and some updates to the save system to track this sort of info.
Another nice little addition would be to let you move the camera slightly with the right analog stick to help better survey your surroundings to avoid ever having to take a leap of faith in the game.
Direction You Face Update
One of the weirdest remnants from the tutorial that was the basis of the early prototypes was that the character would always face to the left when they weren’t moving. I never could quite get this to work without breaking other stuff, but I would really like to adjust the direction you face when idle to be dependent on your last movement.
I love all the mechanics of the game, so it would be cool to either make worlds featuring several levels for each mechanic or some new levels that combine multiple mechanics. The template is all there, so it’s really just a matter of dragging and dropping the platform tiles to create them.
Currently, there is only one secret in the whole game. If you go the opposite way in the first level after you’ve received the speed power-up and launch yourself off a slope just the right way, you can land on a previously unaccessible platform containing a warp all the way to Level 5. I would love to add more neat little touches like this to give Bash the incentive to really explore and try new paths.
Play the Game!
If you’d like to play a slightly edited version of the game, you can download it for Mac here. Controls can be found in the control section above. The first time you run it, you will need to right click and then select open to bypass your Mac being mad I’m not a certified developer. I would suggest running it at a resolution around 1280 x 800 in full screen mode because it has not been optimized for smaller sizes.
I hope you enjoy playing it as much as I loved building it. Whether I decide to pursue something entirely new or pull from the wonderful template I established here, there definitely won’t be a 9 month gap before starting production of the next entry in the growing Pwned and Operated Studios catalog.