Learning to code for weirdos
Hi I’m Ben (perplamps), a game designer and writer working on Ooblets, a game I’m making with Rebecca (but you probably knew all that already).

So, Rebecca recently posted this tweet:

Besides a lot of super encouraging replies, it also led to her getting a bunch of questions, like:

  • Where can I get started programming?
  • What tips or tricks are there?
  • How long did it take to learn programming?
  • What tools do you use?

I figured it might be a good idea to give some insight into how Rebecca and I learned to code and try to give some broad answers to the questions people had. The approaches we have are a little out there and only really go over what worked for us (hence the title). We don’t have much experience in teaching folks how to code, so what’s outlined here might not work for you. In other words, we take no responsibility for anything we write, so if you end up getting dumber after reading all this, please don’t send us angry emails.

A little background

I’ve been coding for a good portion of my life and have worked as a professional software developer for the past five years, but it might surprise you to learn that I don’t touch any of the code on Ooblets. Rebecca does 100% of the programming on every part of the game. That’s partially why I’m the one writing this post— she’s off actually programming the game.

There are a few reasons why only Rebecca touches the code:

  • Rebecca’s incredible at Unity. I’m still a complete Unity noob and my background is all in web dev stuff. Besides that, I think it would be pretty hard for us to find anyone with the breadth of Unity knowledge and speed she has.
  • We’ve tried to do projects where we both coded together in the past and it never really worked out. A big part of that is when you’re self-taught, it’s a bit harder to get started coding in teams.
  • It’s partially a point of honor for Rebecca to say she single-handedly coded everything, particularly given her background.

A lot of self-taught programmers (and also probably everyone?) have their egos wrapped up in their abilities, and Rebecca and I are no different. I’ve watched as she’s been underestimated while working in the industry and how people tend to make assumptions about what her role in things is, and I’ve also seen all the work she’s put into everything behind the scenes, so it’s important to both of us that nobody can discredit or diminish what she’s doing with Ooblets. I think everyone can relate to that in one way or another.

Quick reality check

One thing we giggle at a little is that the theme of many of the comments/questions Rebecca gets seem to be like, “If I could just find the right approach, the right tutorial, the right toolset, some simple secret— it will give me a shortcut to get where you are but by like next week instead of after years and years of hard work”.

Unfortunately, we can’t offer that. We would have definitely taken such a route if it existed. It's taken both us many years to become proficient at what we do and we're still learning all the time. That said, the tools do seem to get more accessible every year— but just remember, if what you’re doing is easy and accessible, there’s a good chance it’s not worth that much anymore.

Getting started before writing a line of code

One thing I distinctly remember about trying to learn how to code was how hard it was to take the very first steps. Getting a development environment going seemed beyond me at first. Just look at the instructions for installing Ruby on Rails these days (they sell a freakin book about it!). If you’re not coming from a technical background, those first little steps can often be a huge wall.

So what should my first steps be?

This is going to be a little unconventional advice, but I would start with one of two things:

1. Play Factorio. (or Rimworld or Human Resource Machine or Prison Architect)

Not really sure if you want to get into programming? Don’t really know what programming is? The above are some games that I think will help you determine if you’re going to have an interest in it. Beyond that, I think they’ll start getting your brain working in the way to work out problems like you do in programming. Game programming is all about building stuff and loving to build stuff, so if that’s not your thing, you might struggle a bit more.

There are games that are more programmy than the ones I listed above, but I think they tend to have a higher barrier to entry.

2. Install Unity.

Unity does a pretty good job at giving you everything you need to get going. In many ways it’s jumping into the deep end, but it’s what Rebecca got started in, so it’s definitely doable. It’s got a huge user base so there are tons of tutorials and a lot of fellow noobs all asking the sorts of questions you’ll be asking (and sometimes there will be answers to those). One quick note: Make sure you use C# and not UnityScript.

But why?

The reason I’m not suggesting things like Scratch or Python or more traditional starting points is that I think it’s important that you get immediate feedback and progress towards the sort of things you actually want to build.

Learning in a vacuum where nothing you do directly translates to what you really want to build can be discouraging. You need to learn that you can actually make stuff to get that positive feedback loop going.

Tricks you probably shouldn’t use at this point

At this stage, you may have heard about some visual programming systems like PlayMaker or EU4’s Blueprints. From what I’ve seen, you can do some pretty cool stuff with these, but I don’t think they’re a perfect base to learn from. You’ll still need to learn most of the fundamentals of programming to use them, but everything will be one step removed from you (and often in frustrating ways), and you’ll be limiting your available tutorials and answered questions dramatically.

Your first project

Don’t worry about learning how to code. Think about what you want to use the code for.

Don’t just plop down in front of a video tutorial and think you’ll learn everything by osmosis. Even if you’re studiously following and coding along with the tutorial, you’ll still just be rote copying, which is a terrible teaching device.

So what do you do instead?

Come up with a project and start making it. Want to make a sprawling procedural space MMO? Let’s do it. A lot of folks will scoff at you, but at this point you need to have a target that actually interests you. Sure, you’ll struggle to even make a Pong clone and you’ll almost definitely fail to reach anywhere near your target, but you need to be excited about what you’re attempting so you’ll have the drive to solve all the problems you’ll face.

Yes, this is from Rebecca's and my early space game attempt

It’s okay to attempt something too ambitious. Everything you do when you start out will be ambitious. If you hit a serious wall or get excited about something else, it’s okay to drop what you were doing and change direction.

What is important for beginners here is to split all your goals into tiny itsy bitsy microscopic steps and focus on just the next immediate step. Move that cube across the screen, get a button to change color when you click it, make a cube follow another cube. Even a space MMO will need these things.

Look up solutions and tutorials for each of your tiny little tasks you get stuck on, so that way you’ll have a reason to commit that knowledge into functional use.

Fundamentals

The fundamentals of programming are actually pretty straightforward, but if you don’t know why you need any of them, they’ll seem completely obscure. Once you start wrapping your head around the limitations of turning code into a game, the fundamentals will start looking like obvious and basic building blocks.

I remember many years ago when Rebecca was brand new to programming, I had tried to explain arrays and loops to her, but she just wasn’t getting it. A short time later when she was working on her own project, she wanted to modify a bunch of items but thought there must be a better way than writing a new line of code for each one. This time around, she figured out arrays and loops instantly because they weren’t some esoteric conceptual thing but rather a solution to a problem she ran into.

If you want a leg up, here are the core concepts you’ll want to have a familiarity with:

  • Variables (is this data a word, a number, or a spaceship?)
  • Operations (adding, subtracting, multiplying, etc. E.g. If your spaceship has 100hp and take 10 laser damage, what are you left with? Take your time)
  • Functions (how to make the spaceship go pew-pew)
  • Conditions (if my spaceship gets pew-pewed to 0hp, make it explode)
  • Classes (how to connect all the functions of your spaceship)
  • Arrays (how to list your 10 million concurrent players)
  • Loops (how to tell each of your 10 million players to buy your DLC)

When you get stuck

As you’re learning, you’re going to be constantly butting heads with the limits of your knowledge, the way you conceptualize problems, things that seemingly make no sense, and a barrage of weird syntax and techno-mumbo-jumbo, but this is normal.

Here’s what you can do when you get stuck:

1. Ask for help

This is what most people will jump to. God knows how often I call out to Rebecca whenever I try to do anything in Unity. BUT I’d suggest you don’t get too comfy with running for help. It can be a crutch, it can be slow (like when you ask a question on a forum and wait 3 days for a response), and it can be frustrating (to both parties).

2. Find another way around the problem

There’s no real shame in this one. Can’t figure out how to get revolving doors working? Change them to sliding doors. Can’t figure out how to make a realistic voxel world? Make everything big and blocky. As long as you don’t give up in general, you’ll fill in the gaps eventually.

3. Copy something you don’t understand

My personal favorite option. Find a couple snippets from Stack Overflow or something and try plugging them in until it does what you want. Eventually you’ll start understanding what these solutions mean, but until then you can at least keep moving.

4. Figure it out

This one is the toughest and least-likely-to-be-implemented suggestion. You can take the time to research the problem, read lots of documentation, try a billion different approaches, and figure out how to solve it yourself. If you’re into that sort of thing.

Now what?

I think ending on “Figure it out” is pretty fitting because that’s really what so much of this all boils down to.

If I can give one last piece of advice, it’s this:

Don’t wait for the planets to align to get started. If you want to do something, the most important step is to do it and not wait on everything to be perfect or easy or when you think you’ll be ready. Just get your hands dirty and find your own way.

P.S. All the images used in this article besides the Factorio screenshot are made by Rebecca, who also does most of the 3D modeling in Ooblets, too!

Tier Benefits
Recent Posts