Grandfather With No Programming or Art Skills Decides to Make a Video Game | The Brick Dead Project

LOL_WUT_CARD_by_xolio101 Lol Wut indeed!

That’s right, folks. This latest endeavor in a long line of Growing Up Otaku Crazy Projects sees Grandpop a’goin’ codin’. I mean, everyone seems to be making their own games these days. How hard can it be? (Spoiler: Very, very hard!).

As this may very well be a long, fruitless journey with nothing but sorrow at the end I thought it might be fun for us to take it together. Misery loves company after all. Buckle up! We’re not simply going inside the sausage factory, we’re going to make our own sausage from scratch.

Let me come clean about my experience level before we get started. I’m not completely without l33t skillz. I know my booleans from my integers. I know my way around an If-Then-Else statement. Heck, I cobbled this site together from bits of code I found lying around the Internet. I mean, yeah, it runs pretty bad, but look: Rounded corners! ROUNDED CORNERS! Bah, you kids take everything for granted these days. Let’s see, what else… I made a few Doom and Quake maps, created a mod to bring El Puno from Anachonox into Freedom Force, and… Oh! I took a couple programming classes in high school. Everyone still uses Basic and Pascal, right?

At least I’m a little more prepared from a design standpoint. I’ve always had a bit of a critical eye for game systems. It’s something you learn when you spend you evenings hanging out at a hobby shop debating with the ‘rules lawyers’ of miniatures wargames. I’ve even taken the occasional stab at creating my own tabletop system or board game. I’ve spent tons of hours with pre-made game construction titles like Bard’s Tale Construction Set, Unlimited Adventures, and The War Engine. Many times I find the act of dissecting game mechanics a great deal more enjoyable than playing the games themselves (As GUO’s reviews section can attest). While I can appreciate the spectacle of modern games, if you really want to get my interest show me an interesting risk/reward loop!

And as for art… Well, you remember my encounter with 123D Sculpt?

201108121540470000 

Believe it or not, those took a while. Also, there’s a reason I used GoAnimate to create the GUO comic.

The final piece of the puzzle is sound. Previous GUO Crazy Projects have given me a leg up in this area. I’m light-years away from anything vaguely resembling professional, but at least I have some tools and a bit of modern knowledge. I also have a home theater connected to my PC, so.. Yay!

Anywho, that’s where I am. Let’s see where I’m going.

This isn’t exactly a spur-of-the-moment decision. I’ve had a hankering to check out the Unity engine for a while now. Not to fulfill any kind of ‘Dream Project,’ but just to see what’s up on the inside of my video gaming hobby. As I said before; To see how the sausage is made. The Unity 3D game engine has really come into its own over the past couple years, growing from web-based novelty to mobile platform powerhouse and now making inroads on my home turf of PC gaming. And it’s free which is the price range I’m looking for. There are a couple other options like Game Maker or Unreal, but I figure, “Why not go with the new hottness?”

A word of warning before we get started: I’m not the guy to learn this stuff from. Anyone with any amount of real knowledge is going to be raging at the screen as I call functions classes and classes subroutines as I happily butcher the lingo. These are my real, no BS experiences while attempting to crack an infinitely complex code with no preparation or thought. Anything I say can, and, probably, will be wrong. We’re here to enjoy the ride, not learn about the birds on the way.

 

A journey of a thousand miles begins with a single step – Laozi, Tao Te Ching

Wait… This is what a modern game engine looks like?!

Unity3dDefaultView

Bwahahaha! No wonder why everyone’s making games! Geez, I’ve seen map editors more complicated. Man, you kids with your point-n-click. 3D camera kinda sucks for a 3D engine. Where’s the vertical control? Oh, middle mouse button. Pfft, you kids and your mouse buttons. Now, let’s see… Hmm, looks like there’s a lot of funny terms to figure out. Still, a couple clicks and I’ve got some squares and cubes. Seriously, two clicks to get a cube on screen complete with lighting and physics. What an age we live in! It used to take people weeks to get this far.

More odd terms: GameObject (Yeah, one word), Transform, Rigidbody… Heh, Rigidbody. The buttons at the top let me move and resize stuff ‘cause, Lord knows, everyone is so scared of keyboards these days to bother typing in the little boxes on right. And these VCR buttons… Huh, this thing compiles on the fly and runs the program in an editor window? Neat! No more queuing up for time on the college mainframe to compile the first draft of your inevitably broken code.

An hour of poking at Unity leaves me no more enlightened but a good deal more confident. It was time to dive in and see what this puppy can do! Fortunately, the Unity3D web site sports a section entitled “Learn” which is packed full of places to start.  I elect to skip all of the prominently featured categories with useful labels such as “Editor,” Graphics,” and “Physics” and dive headlong into the most intriguing category buried as a hyperlink in the page description: “Projects.”

It’s a good thing I am a humble man at heart (Are you still humble after publicly declaring yourself humbe? Hmm. Maybe next week we’ll learn philosophy). The ordering of Unity’s Learn archive has all the care and attention of someone pushing the ‘Sort by: Alphabetical’ button. I promptly look past the pretty, shiny projects like “Space Shooter” and “Project: Stealth” for the small, gray world of Roll-a-Ball.

It’s perfect! Well, as perfect as a whirlwind of Latin dictionary pages are to a kid learning to read. I meticulously pick over every word and try every option. I’ve spent some time learning from video on previous projects and know just how important judicious use of pause and rewind is. Compounding the difficulty of following along is the fact that this is one of those over scripted, educational styled videos. You know, the ones who spell everything out every single time they mention it? For example, calling something a “context sensitive gear menu" every time, while technically correct, floods the viewer with too much information. “Gear menu” or even “Click the gear” will do just fine after the first couple times, thanks.

The project takes hours. Still, by the end I have a successfully completed the lesson. I haven’t exactly absorbed much of anything, but at least I’ve been exposed to the lingo. Heck, I’ve even created a few scripts in C# (pronounced See-Sharp). I didn’t even know there was a C#! C, C+, and the stupidly named C++, yeah, but C# was a new one. I spend the next day pulling the Roll-a-Ball project apart one piece at a time, changing values and searching every command on the Internet. Unity includes a nifty little feature where you can highlight a command and hit Ctrl+’ to access the reference manual on it, but I can’t actually understand anything the manual is trying to tell me. The Google hits from message forums get me a whole lot further. By the time I’m done tinkering with the Roll-a-Ball I’ve adjusted speed, gravity, made the ball get bigger as pickups are collected, and even added a jump button which, amusingly lets the ball fly if you whack it fast enough. Huzzah! My first bug!

I’ve also come to despise modern programming languages with their case sensitivity, obsessive punctuation, and free-wheeling, object-oriented nature. Every single line of code I write causes the system to belch back a dozen red error messages, usually due to a forgotten semi-colon or curly-bracket at the end of on line that causes every other line in the script to bomb. Honestly, it takes me upwards of an hour and a dozen Google searches to write a command. The show-offs online with their syntactic sugar don’t make it any easier.

Sill, I’m having fun and chuckling to myself with every minor achievement. I’ve gone back to watch some of the more basic walkthroughs on actually using the editor and I now know my Rigidbody from a hole in the ground. The task of learning both Unity and C# simultaneously is daunting, but I feel I’m making progress even in these first few days. It is time to move on from the comforting, grey world of what was once Roll-a-Ball, now dubbed Destroy All Kittens! (The Mrs. is quick to rename it Hug All Kittens!) So… Success! I had created a game. Maybe not my game, but a game. It was time to go in search of fresh prey!

roller

For my next conquest, I chose Unity’s “Project:Stealth”, another beginner video tutorial series on Unity’s site. It’s a disaster. By the end of part 2 of 26 I’m left a shrieking shell of man staring slack-jawed at the screen. Using prefab assets may seem like a good idea on paper, but to a total noob it proves more overwhelming than the instructions on how to create ‘em. I don’t know what anything is, how it works, where it came from, or, in some cases, what it is. I had just created something on par with Pong. This was a pile of Metal Gear pieces. That was me rage-quitting.

I’m gonna try with a little help from my friends – Lennon & McCartney, Sgt. Pepper’s

The next day, bruised and battered, I decided to try my luck with the largest repository of how-to videos known to man: YouTube. From hanging a picture, to digging up your septic tank, to making video games, YouTube’s got at least a dozen videos waiting for you. Sure enough, the next week saw me devouring hours of amateur productions demonstrating how to create barren facsimiles of several classic games. Following my abject and total humiliation at the hands of Project: Stealth, I held no illusions as to how little I knew or how far I had to go. I favored anything featuring the plain, grey primaries of Unity’s native environment over the flashier wizz-bang graphics currently equated with gaming. I alternate between mimicry and experimentation. Spend a day following along with a tutorial project. Spend the next tearing it apart, changing it, understanding it.

Education by way of this modern equivalent of public access television is a thrilling way to learn. The casual nature of the videos also serve to bolster my recently bruised ego. After seeing other, much more experienced folks stare blankly at a malfunctioning bit of code after pulling such rookie goofs as forgetting to attach a newly written script to an object, I felt less bad about myself when I inevitably made the same mistake. The endless supply of lessons and teachers is a huge boon to education. The nuance of a particular function may be glossed over by one instructor only to be defined in excruciating detail by another. The choice of a single world by the instructor can mean the difference between a concept clicking with a student or sailing right over their head.

unity-inspector-window Here’s my most memorable example: While following along with a particularly charismatic, motor-mouthed surfer named quill18, he uttered a single statement that changed my understanding of the Unity world completely. “These commands we’re writing? They are the components and values of our GameObject listed in the Inspector panel.” Boom! In an instant I had learned most of the custom commands in Unity and demystified the connection between the UI and my own code. This one fact stated by this one man phrased this one way changed my entire view of the Unity environment. Every component in the UI was something I could call and each of its settings was a variable I could change at anytime. It was the Rosetta Stone I had been hoping for!

On the same token, it would take another instructor hundreds of miles away to begin to demystify vector mathematics. They say it takes a village to raise a child and I was but a babe lost in this digital forest.

C# on the other hand continued to be a bit of a mystery in terms of… Not necessarily the How, but the Why and Where. Object oriented programming (and C in general) was not something I had been exposed to before. Well, except for that one time I tried to bluff my way into a C programming job with my dazzling knowledge of both ReadLine AND WriteLine. Fortunately, Unity’s own website came back to help on this front. They had just launched their own, all too short, series of videos on C# scripting. The concepts were a basic, the explanation of the C# format helped immensely. I took a day off from the Unity stuff and went through a couple written C# introductory articles as well. It was the little nudge I needed to get all this class, coroutine, and function malarkey to click into place. It was essential and I was glad I did it. I’m not sorry I didn’t get to the ‘boring’ stuff sooner, but I’m sure as heck glad I hadn’t waited any longer. I should do a lot more, but… Meh, boring stuff is boring ;) Goggle is the great equalizer when it comes to coding and my Google-Fu is strong.

What it boils down to is one percent inspiration and ninety-nine percent perspiration – Thomas Edison, Uncommon Friends

I was happily ripping apart my latest exercise in game creation, a basic facsimile of the Atari classic Breakout, when I happened upon an interesting idea: Could you bolt a modern third-person camera onto this to make a bowling game? Seeing as how Unity is a 3D engine first and foremost, the answer was, obviously, yes. What I wasn’t prepared for was how thrilling and visceral the experience of playing Breakout from this close would be. While I always considered brick-breaking games like Arkanoid and Shatter to be enjoyable in their fast paced destruction and pool player-like trigonometry (plus, I adore video game physics!), I wasn’t quite expecting how interesting it would be to have to catch this bouncing ball with your face. I pulled the camera back and up from the paddle. I added a grey primary capsule just to the left of the center the way players are represented in third-person action games. I relaxed the move constraints to allow just a bit of back-n-forth movement, much like in a doubles match of tennis. Adding some rotation to the paddle not only widened the possible field of view, but added a wealth of new options to my ball-bouncing pleasure. There was something here. Something I hadn’t quite seen before. It was a little pinball, a little Tron Deadly Discs, and a little racquetball. There were problems, for sure. The largest of which being how to keep track of such a fast and critical object than can, and will, drastically change direction while behind obstacles. Still… There was something here.

My mind raced with possibilities. What were the best parts of a brick-breaking game? How could they be adapted or improved to fit a third-person action game? What if you could pop multi-ball any time you want? Could it be balanced by shutting off the paddle while you launched a new ball? And why implement power-ups only when some random pickup drops? Why not use some manner of energy system and let the player budget as they see fit? Perhaps some kind of power regeneration object to reward skill shots with more energy? What if… How about… I wonder…

I didn’t know if it would even work, but I did know of one way to find out.

This, my friends, is the origin point of The Brick Dead project. Vector3.forward!

And that, my friends, was my very first terrible programmer joke. Thank you! Don’t forget to tip your waitress!

Still, it was going to be a long, difficult road from this:

brick dead concept

to this:

BrickDeadPrototype

I had been learning about creating games in Unity using C# for one week. It felt like a whole month had passed. The one, single lesson I had mastered was that I knew so very little.

No comments :

Post a Comment