{"id":68156,"date":"2018-12-11T08:58:00","date_gmt":"2018-12-11T08:58:00","guid":{"rendered":"http:\/\/www.gamasutra.com\/view\/news\/332251"},"modified":"2018-12-11T08:58:00","modified_gmt":"2018-12-11T08:58:00","slug":"how-to-get-started-with-game-programming","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2018\/12\/11\/how-to-get-started-with-game-programming\/","title":{"rendered":"How to get started with game programming"},"content":{"rendered":"<p><strong>This post was written by Ben Wasser, a game designer and writer currently co-developing quirky\u00a0farming sim <em>Ooblets<\/em> with programmer and artist Rebecca Cordingley.<\/strong><\/p>\n<p id=\"cf2b\">I make games with my wife,\u00a0<a href=\"https:\/\/twitter.com\/nonplayercat\" rel=\"nofollow noopener\" target=\"_blank\">Rebecca<\/a>. Earlier this year, she posted\u00a0<a href=\"https:\/\/twitter.com\/nonplayercat\/status\/960888231104565250\" rel=\"nofollow noopener\" target=\"_blank\">the tweet I&#8217;ve screencapped below<\/a>. Go and look at it then come back here. You&#8217;ve returned? Good.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p>Besides a lot of encouraging replies, she also got a bunch of questions like:<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<ul>\n<li id=\"d1b6\">\u201cWhere can I get started with programming?\u201d<\/li>\n<p>&#013; <\/p>\n<li id=\"39e0\">\u201cWhat tips or tricks do you have?\u201d<\/li>\n<p>&#013; <\/p>\n<li id=\"e8d1\">\u201cHow long did it take you to learn programming?\u201d<\/li>\n<p>&#013; <\/p>\n<li id=\"709b\">And everyone\u2019s favorite question, \u201cWhat tools do you use?\u201d<\/li>\n<p>&#013;\n<\/ul>\n<p id=\"48b6\">I figured I could give some insight into how Rebecca and I learned to code and try to give some broad answers to the questions people had.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"1ca1\">The approaches we have are a little\u00a0<em>out there<\/em>\u00a0and only go over what worked for us. We don\u2019t have much experience in teaching folks how to code, so what\u2019s outlined here might not work for you. If you end up getting dumber after reading all this, please don\u2019t get angry at me.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-get-started-with-game-programming.png\" \/><strong>An important disclaimer<\/strong><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"562a\">I taught myself how to program and have been working as a professional software developer for quite a few years since then, but I don\u2019t actually do any of the programming on Ooblets.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"b7ab\">Rebecca handles all the programming as well as most of the art. If you haven\u2019t figured it out yet, she\u2019s pretty incredible.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"50bf\">I, on the other hand, focus on the game design, writing, and marketing (all of which she also helps out on). I don\u2019t touch the code on Ooblets because Rebecca is much, much better than me at Unity, it\u2019s often tougher for self-taught programmers to work together quickly, and because it\u2019s a point of pride for us to say she single-handedly coded everything.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"7794\">I mention all this because I\u2019ve watched as she\u2019s been underestimated while working in the industry and how people tend to make assumptions about what her role in things is. I\u2019ve also seen all the work she\u2019s put into everything behind the scenes, so it\u2019s important to both of us that nobody can discredit or diminish what she\u2019s doing. I hope everyone can relate to that in one way or another.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h2 id=\"5bfd\"><strong>Quick reality\u00a0check<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"07b7\">There\u2019s a common line of thinking that if you could just find the right approach, tutorial, toolset, or some simple secret, you could get to the finish line without years of hard work.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"3bfa\">Unfortunately, we can\u2019t offer that. We would have definitely taken such a route if it existed. It\u2019s taken both us many years to become proficient at what we do and we\u2019re still learning all the time.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"8d6b\">That said, the tools do seem to get more accessible every year\u200a\u2014\u200abut just remember, if what you\u2019re doing is easy and accessible, there\u2019s a good chance it\u2019s not worth that much anymore.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h2 id=\"2bf3\"><strong>Getting started before writing a line of\u00a0code<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"a29e\">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!).<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"1e99\">If you\u2019re not coming from a technical background, those first little steps can often be a huge wall.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h2 id=\"7424\"><strong>So what should my first steps\u00a0be?<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"79ce\">This is probably not what a lot of other guides might say, but I would start with one of two things:<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"b760\"><strong>1. Play\u00a0<a href=\"https:\/\/store.steampowered.com\/app\/427520\/Factorio\/\" rel=\"nofollow noopener\" target=\"_blank\">Factorio<\/a>\u00a0(pictured below)<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"24b0\">(or\u00a0<a href=\"https:\/\/store.steampowered.com\/app\/294100\/RimWorld\/\" rel=\"nofollow noopener\" target=\"_blank\">Rimworld<\/a>\u00a0or\u00a0<a href=\"https:\/\/store.steampowered.com\/app\/375820\/Human_Resource_Machine\/\" rel=\"nofollow noopener\" target=\"_blank\">Human Resource Machine<\/a>\u00a0or\u00a0<a href=\"https:\/\/store.steampowered.com\/app\/233450\/Prison_Architect\/\" rel=\"nofollow noopener\" target=\"_blank\">Prison Architect<\/a>)<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"c883\">Not really sure if you want to get into programming? Don\u2019t really know what programming is? The above are some games that I think will help you determine if you\u2019re going to have an interest in it. Beyond that, I think they\u2019ll 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\u2019s not your thing, you might struggle a bit more.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"f312\"><em>Note: There are games that are more programmy than the ones I listed above, but they tend to have a higher barrier to entry.<\/em><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"363\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-get-started-with-game-programming.jpg\" width=\"646\" \/><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><strong>2. Install\u00a0Unity<\/strong><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"a0a8\">Unity does a pretty good job at giving you everything you need to get going. In many ways it\u2019s jumping into the deep end\u200a\u2014\u200abut it\u2019s what Rebecca got started in, so I know it\u2019s definitely doable.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"ff62\">It\u2019s got a huge user base so there are tons of tutorials and a lot of fellow noobs all asking the same sorts of questions you\u2019ll be asking\u00a0<em>(and sometimes there will be answers to those questions)<\/em>.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"19ce\"><strong>But why?<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"54f7\">The reason I\u2019m not suggesting things like\u00a0<a href=\"https:\/\/scratch.mit.edu\/\" rel=\"nofollow noopener\" target=\"_blank\">Scratch<\/a>\u00a0or\u00a0<a href=\"https:\/\/www.python.org\/about\/gettingstarted\/\" rel=\"nofollow noopener\" target=\"_blank\">Python<\/a>\u00a0or more traditional starting points is that I think it\u2019s important that you get immediate feedback and progress towards the sort of things you actually want to build.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"9076\">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.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"ab10\"><strong>Tricks you probably shouldn\u2019t use at this\u00a0point<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"a62b\">At this stage, you may have heard about some visual programming systems like PlayMaker or EU4\u2019s Blueprints. From what I\u2019ve seen, you can do some pretty impressive stuff with these, but I don\u2019t think they\u2019re a perfect base to learn from. You\u2019ll 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\u2019ll be limiting your available tutorials and answered questions dramatically.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h2 id=\"00ec\"><strong>Jump into your first\u00a0project<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"ed38\">Don\u2019t worry about learning how to code. Think about what you want to use the code for.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"6366\">Don\u2019t just plop down in front of a video tutorial and think you\u2019ll learn everything by osmosis. Even if you\u2019re studiously following and coding along with the tutorial, you\u2019ll still just be rote copying, which is a terrible learning method.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"21d7\"><strong>So what do you do\u00a0instead?<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"c661\">Come up with a project and start making it.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"a0cf\">Want to make a sprawling procedural space MMO?\u00a0<em>Let\u2019s do it.<\/em><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"485\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-get-started-with-game-programming-1.png\" width=\"646\" \/><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 Yes, this is from Rebecca\u2019s and my early space game\u00a0attempt<\/em><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p>A lot of folks will scoff at you, but at this point you need to have a target that actually interests you. Sure, you\u2019ll struggle to even make a Pong clone and you\u2019ll almost definitely fail to reach anywhere near your target, but you need to be excited about what you\u2019re attempting so you\u2019ll have the drive to solve all the problems you\u2019ll face.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"027f\">It\u2019s 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\u2019s okay to drop what you were doing and change direction.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<blockquote id=\"19f4\"><p>It\u2019s okay to attempt something too ambitious<\/p><\/blockquote>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"f934\">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.\u00a0Move 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.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"fbfe\">Look up solutions and tutorials for each of your tiny little tasks you get stuck on, so that way you\u2019ll have a reason to commit that knowledge into functional use.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h2 id=\"83e1\"><strong>Fundamentals<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"3621\">The fundamentals of programming are actually pretty straightforward, but if you don\u2019t know why you need any of them, they\u2019ll 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<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" height=\"485\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-get-started-with-game-programming.gif\" width=\"646\" \/><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0<em>Assorted asteroids by Rebecca<\/em><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"f2b4\">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\u2019t 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. At that point, they weren\u2019t some esoteric conceptual thing but rather a solution to a problem she understood because she ran into it.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"4ab7\">If you want a leg up, here are the core concepts you\u2019ll want to have a familiarity with:<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<ul>\n<li id=\"cf3b\"><strong>Variables:<\/strong>\u00a0Is this data a word, a number, or a spaceship?<\/li>\n<p>&#013; <\/p>\n<li id=\"2571\"><strong>Operations:<\/strong>\u00a0Adding, subtracting, multiplying, etc. E.g. If your spaceship has 100 hp and take 10 laser damage, what are you left with? Take your time.<\/li>\n<p>&#013; <\/p>\n<li id=\"bb6d\"><strong>Functions:<\/strong>\u00a0How to make the spaceship go pew-pew<\/li>\n<p>&#013; <\/p>\n<li id=\"21d1\"><strong>Conditions:<\/strong>\u00a0If my spaceship gets pew-pewed to 0 hp, make it explode<\/li>\n<p>&#013; <\/p>\n<li id=\"30f2\"><strong>Classes:<\/strong>\u00a0How to connect all the functions of your spaceship<\/li>\n<p>&#013; <\/p>\n<li id=\"12a7\"><strong>Arrays:<\/strong>\u00a0How to list your 10 million concurrent players<\/li>\n<p>&#013; <\/p>\n<li id=\"f42f\"><strong>Loops:\u00a0<\/strong>How to send a notification to each of your 10 million players to buy your DLC<\/li>\n<p>&#013;\n<\/ul>\n<h2 id=\"c656\"><strong>When you get\u00a0stuck<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"e5e3\">As you\u2019re learning, you\u2019re 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\u00a0<em>normal<\/em>.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"5b04\"><strong>Here\u2019s what you can do when you get\u00a0stuck:<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"13b6\"><strong>1. Ask for\u00a0help<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"4b24\">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\u2019d suggest you don\u2019t 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).<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"485\" src=\"http:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2018\/12\/how-to-get-started-with-game-programming-2.png\" width=\"646\" \/><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p><em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 An unnamed spaceship by\u00a0Rebecca<\/em><\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"e91a\"><strong>2. Find another way around the\u00a0problem<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"0b22\">There\u2019s no real shame in this one. Can\u2019t figure out how to get revolving doors working? Change them to sliding doors. Can\u2019t figure out how to make a realistic voxel world? Make everything big and blocky. As long as you don\u2019t give up in general, you\u2019ll fill in the gaps eventually.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"55f7\"><strong>3. Copy something you don\u2019t understand<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"df9b\">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\u2019ll start understanding what these solutions mean, but until then you can at least keep moving.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"996d\"><strong>4. Figure it\u00a0out<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"2eae\">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\u2019re into that sort of thing.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h2 id=\"590e\"><strong>Now what?<\/strong><\/h2>\n<p>&#013;<br \/>\n&#013;<\/p>\n<h4 id=\"2a32\"><strong>If I can give one last piece of advice, it\u2019s\u00a0this:<\/strong><\/h4>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"7f67\">Don\u2019t 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\u2019ll be ready.<\/p>\n<p>&#013;<br \/>\n&#013;<\/p>\n<p id=\"4149\">Commit to a plan, get your hands dirty, and find your own way.<\/p>\n<p>&#013;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post was written by Ben Wasser, a game designer and writer currently co-developing quirky\u00a0farming sim Ooblets with programmer and artist Rebecca Cordingley. I make games with my wife,\u00a0Rebecca. Earlier this year, she posted\u00a0the tweet I&#8217;ve screencapped below. Go and look at it then come back here. You&#8217;ve returned? Good. &#013; &#013; Besides a lot [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":68157,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-68156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/68156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=68156"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/68156\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/68157"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=68156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=68156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=68156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}