home games about news contact

APRIL - 8 - 2016

Little Evvie Extends his first Class : lessons learned

Some history: I began my programming career writing ActionScript 1 and 2 for Flash sites. Eventually I upgraded to Actionscript 3 and was introduced to the wonders, possibilities and headaches of Object Oriented Programming! The transition was a difficult one to make but in the end I became a stronger coder, and I learned a lot of best practices.

Fast forward to Flash's slow and painful death and I found myself suddenly without the platform I had come to love so much. Flash was a ton of fun to code for (even if it was a bit buggy and unpredictable at times) and now I felt adrift in a sea of alien languages. That was when I found Unity.

At the time, Unity was still very young and largely unknown. I convinced my boss at the time to let me try my hand at it, so we downloaded the free version and I set to work teaching myself Javascript, which struck me as being very similar syntactically to AS3. Not long after my first exposure to it, I fell in love with Unity and have been zealously developing in it ever since.

Mind you, I transitioned from Unityscript to C# pretty quickly. I love me a nice, strict typing schema. The stricter, the better in my opinion. But I digress - here we are now in 2016 and I have been happily coding applications and games in Unity.

I spent over a year developing B.O.S.S with Unity's built-in multiplayer framework, and suddenly out of the blue I launch my project one fateful morning to find all my functions have been deprecated. My jaw dropped. I sped to the Unity site to find that they had proudly released a brand new, shiny, completely overhauled networking system.

I was agog. I was aghast. I was angry that they had condemned to obsolescence, all of the old system's methods without so much as a heads-up! I found myself entrenched thoroughly in outdated functions that threatened to be unsupported pretty quickly.

I kept chugging away, unable (and unwilling) to scrap a year's worth of work to start over with a system I didn't understand, that was largely (and poorly) undocumented and still very, very untested. B.O.S.S continued to progress, and I kept my fingers crossed that my functions will continue to be supported.

About B.O.S.S: let me rewind a little. I mentioned my old boss earlier. He's an awesome guy. He's no longer my boss, per se, but we remain friends to this day. He taught me a lot of important lessons while I developed for him, the most important of which was how to approach any new project. You start with the boringest stuff first. Let me explain.

Whenever I began a new game or interaction in Flash, I started with the menu. What will the user see first? What questions will they ask? Answer those questions first. The big three are: “What am I supposed to do?”, “Why am I doing it?” and “How do I do it?” Answering those fundamental questions is paramount to create a successful piece of interactive media.

You can't show a proof of concept to a client without making sure the answers to those three questions are easily and readily available to any user that might interact with your program. Well, B.O.S.S is the first piece of media I started making that wasn't for a client in some regard. It's the first game I made that I really wanted to play, and in my excitement, I forgot that most important of lessons.

Don't get me wrong, B.O.S.S is (in its current form) very much a proof of concept. It's unfinished, unpolished and very rough around the edges. I dove headlong into its development with the goal of making it playable by me and my friends. In so doing I didn't even think about answering those big three questions. I shouldn't have been surprised then when the major criticisms I got from my playtesters (all friends of mine) were comments like: “I don't know what I'm supposed to do.” or “I don't know how to do anything.”

My heart sunk upon receiving their feedback. I had been so focused on the excitement of coding this game, that I never took my larger audience into consideration. I'm grateful they woke me up to the problem, and I have already taken steps to start fixing it.

The first step I took was putting B.O.S.S aside for a little bit. It needs a lot of reworking to make it as good as it can (and should) be. I didn't want to rest on me laurels though, which brings me back to Unity's new multiplayer system.

I knew that I wanted an opportunity to learn the new system, but I needed a break from B.O.S.S to clear my head. I had been deeply entrenched in it for over two years and no longer had any perspective on it. Enter, Speller Casters!

Speller Casters is a game I've always wanted to make (and play) and it offered the perfect excuse to learn the new networking system, and to make a project like it should be made, with the three questions in mind.

So I've started writing Speller Casters in earnest. I've already learned a lot, but as with every new system, there have been a lot of headaches and growing pains. Just using Unity's out-of-the-box networking manager I was running into errors and warnings galore. Search after search offered up one common solution: “Write your own network manager.” So that's what I did!

And thus we have come to the title of this journal. Little Evvie finally had to extend his first class. It took me over ten years of coding to have to do it, and here I am proud to say it was easy and actually kind of fun. I intend to extend and inherit all kinds of classes from here on in, tailoring them to my needs as I see fit.

In the future I'll bear in mind the lessons I learned as a developer, and I'm doing my best to forgive myself for mistakes made. B.O.S.S will get a rewrite and an overhaul to make it better and more understandable, but until that point it's still playable and, as always, free-of-charge.

I look forward to revealing Speller Casters to the world when it's ready. Until then, I'll be extending base classes, inheriting functionality and answering the big three questions along the way.



all materials © polakię games — patreon