Once You Web Dev, You Can Anything Dev: Revisiting Unity3D

Here I am, nearly 12 weeks later, finishing up my immersive full stack web development course at Flatiron School. It’s amazing how much progress I’ve made in learning how to code in such a short period of time — even after having been coding for the last 10 years. Starting off in the program, we are all too hard on ourselves. We expect to be able to pick up coding immediately. Clearly that’s an unreasonable expectation for anything that we are completely new to. You probably didn’t write your first original song after only 1 week of learning a new instrument, so why do we expect ourselves to pick up a cognitively challenging task in such a short period of time? Even I struggled, because programming languages and object oriented programming are incredibly challenging, even coming from writing scripting languages.

In college, I had been learning 3D modeling skills, and I wanted to find a way to use the technology I could understand to build out a 3D virtual tour. Turns out that my university had access to Unity 3D, so I pursued programming it out in Unity3D and Javascript. It was very difficult to tweak and get exactly the way I wanted it. I didn’t have enough experience in the 3d domain, so I was unable to configure things like collision detection, and appropriately determine speeds and velocity for the camera in the short period of time I had to finish the project, however, it was still pretty cool in my eyes. Now, I feel like have a much better handle on understanding programming. I probably couldn’t rebuild this virtual tour in a day yet, but I understand the code much better and could build a much better project.

I did some quick research on making games in Javascript to possibly inspire my classmates, and found information that changed my whole outlook on how we could use our newly acquired coding knowledge for gaming. I assumed that since I already know Javascript much better, it makes sense to try Unity3D with it again. However, countless threads and even my coworkers suggested not to use javascript in Unity. Why not? Javascript is on the up and up, and there’s even OOP-like syntax for it with ES6 now, so what’s the issue? Turns out that Unity wasn’t using real Javascript (apparently since Unity 5, it does now?). What I had actually used to program it the first time was Unity’s version of Javascript, called UnityScript, which from my research, is Unity’s Javascript-like language that compiles back down into C#. And although there are a plethora of tutorials on using UnityScript to make a game, nearly every developer advised against it — even Javascript developers who had used Unity for game development. That was a little discouraging to come across at first. C# seems so intimidating. I remember it was my first programming language that I worked with professionally. I had to use Visual Studio and ASP.net for 3 months each at 2 separate jobs and I never fully understood it. I avoided OOP like the plague all of my career, but I could maneuver around it just fine.

But I know Ruby now. In fact, I feel way more comfortable with it than I ever thought I could — and even feel more comfortable using it to program than with Javascript at the moment. All I needed was a set of structured classes — not experimentation, not online courses, and not night courses (way too exhausted from work to apply myself extra during and after class), to help me better grasp the material. I stumbled upon a tutorial that compares a function in C# to a function in Unity’s “Javascript”. Before starting the video, I could already see the comparisons between the two, and I could also identify that it wasn’t real Javascript (since when do you have to specify the “type” in Javascript? What is this, a statically typed language?!). I didn’t need the side-by-side “Javascript” to get it. Well duh, I know Ruby now! Why am I so intimated by programming languages? Because I failed miserably at excelling in ONE Java course literally 10 years ago? I don’t need to tip-toe around these languages anymore. The bootcamp did exactly what it advertised — it turned me into what feels like a true developer, even 10 years after mostly picking up coding on my own. The difference now is, I can interpret other languages — and even have opinions on what makes languages feel right for certain projects and wrong for others, or find where the language has its drawbacks and work around them or smartly pick a better language to utilize.

While it took me a while to quite get to this point, what I learned is, I wasted a lot of time trying to use inadequate tools to build the things I wanted to create. I always thought a language like Java or C# would be “too hard”, but the issue was I didn’t have access to what helps me learn best. Comment after comment in the threads that I read while researching stated that many users made the same mistake. Had they built out their games in C# the first time around, whether they were brand new to development or highly skilled or not, they would have had far fewer bugs and complications had they taken the most sensible route, which was to use the language the platform was simply designed to handle the best (except Boo, however there is not enough documentation or tutorials on this according to threads). There are even resources for using Ruby and Javascript for robotics — another branch of technology I’ve been curious to dabble in, but never had the slightest idea of where to start. Using pre-programmed music-responsive LED lights was the closest I ever got.

My project for PEX Summer Festival 2013