How do I get started programming games???
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.
I remember maybe 5 years ago I emailed a M.I.T. professor after seeing her on a PBS special talking about AI. I poured my brain into an email to her about my theories on AI development, how machines can be programmed to recognize environments, how emotions can be learned through experience,etc. I spent a good 4 hours writing the email because I felt a connection to this professorâ€™s work. It was an exciting email to write because it was something I was very interested in and I wanted to reach out and talk to someone about it. There was so much hope while I was writing it that maybe I would get a response back and I would have someone to talk to about this kind of stuff, maybe get me started on the path to creating advanced machine AI. Sadly, I never heard back from herâ€¦I donâ€™t even know if she read the email.
Lately, because of Indie Game: The Movie and Super Meat Boy, I get several emails/twitter mentions/formspring questions a day from people wanting advice. Most of the emails are from younger fans and are requesting advice ranging from â€śWhat language do I useâ€ť to â€śHow do I get my game on Xboxâ€ť. I read every email but I donâ€™t always respond because it would take a good part of my day, not to mention there is little variation between emails.
I legitimately feel bad when I donâ€™t respond because these are people that are just reaching out and want someone to shed some light game development. They are doing the same thing I did with that M.I.T. professor so many years ago. They are interested in what I do and want to know how to do it, they want to be a part of game development in some way. Well, I want to help but donâ€™t have the time, knowledge, or desire to be a teacher â€¦so here we are. This is an FAQ for anyone who wants some advice in some way from me about making games.
Where do I start on my dream game idea?
Where do I start is the most common type of question I get. I feel like starting is the biggest hurdle for a lot of people because they donâ€™t realize that everything, even the crazy AAA game you see out there,started out as nothing and built upon itself until it became what it was destined to be. When your dream game is sitting in your head and you take that first step towards creating it, it can be very overwhelming to go from a state of imagination to implementation. For someone who has never made a game, something as simple as making a character move can be something that just seem like a huge impossible hurtle and can quickly become a huge discouraging defeat. It doesnâ€™t have to be like this, the key is to start small.
Super Meat Boy started off as a quad with the image of Meat Boy on it. Mew-Genics started out as a black square that moved back and forth on the screen. Goo! started out as circles with smiley faces on them. â€śGame 2â€ť started out as a vectorized image of the character in â€śGame 2â€ť. Everything starts out at the very most basic level and builds up from there.
Itâ€™s very important to take things one step at a time. If you approach your dream game all at once, chances are you will get frustrated and overwhelmed. If you approach the same dream game one little step at a time, your chances of realizing your vision are exponentially higher.
Breaking your gameÂ down into small pieces forces you to analyze and evaluate your ideas on a deeper level. This is essential because you always want to be open to changes, you never want to set yourself into a path that you feel you can in no way deviate from. Deviation from the plan can yield the most interesting parts of a game. Itâ€™s a more organic way of developing because you are thinking within the game system and are applying new ideas to ideas that have already formed.
So, try your best to break down your ideas in to small chunks that can be accomplished easily within your current skillset. Itâ€™s easier to see progress that way, you donâ€™t get frustrated as easily, and you can come back to your work later and easily pick up where you left off. Remember that there is no time limit on when you have to get your game out (if you are starting out like that, you are in for a rough time). Learn at your own pace and build your projects like you build Legosâ€¦one piece at a time.
For a more detailed example, let me go through how SMB started. Once I had that quad with the MeatBoy image on it, I hooked up input so I could move it back and forth. After I played with that a little bit I made it so that when I pressed a button my Meat Boy quad would jump, then I worked on stopping him when he landed on a platform, then I worked on stopping him when it he a wall, then I made him stick to walls, then when he stuck to a wall and I hit a button he would wall jump, then if he hit a greensquare he died and so on and so on until the last line of gameplay code was written and Super Meat Boy was complete.
No task is too small, no amount of progress is too little. What is important is that you do not get frustrated and you continue to work on your game.
What programming language do you recommend?
This is the second most common question I get and to be honest I donâ€™t like this question because it is a question I cannot answer. I always try to answer the question with â€śwhatever language you feel the most comfortable withâ€ť. I donâ€™t think this answers peopleâ€™s questions effectively because I feel people are looking for a definite answer or they are just starting out and do not feel comfortable with any language. Iâ€™m going to try to elaborate on my answer to maybe help people understand how to choose a language that is best for them or help them understand that using what they are comfortable with is the best way to start out.
If you are looking for advice on what programming language to start with you donâ€™t need to concern yourself with â€śWill Flash run on iOSâ€ť or â€śDoes Xbox run Javaâ€ť or â€śDoes XNA run on Macâ€ť. Your foreseeable end game at the starting point is realizing a game, not releasing it or selling it. These questions are important when worrying about shipping a game, but shipping a game is way easier than realizing a game. You can worry about shipping your game later.
Find a language that clicks with you and start coding.Â In the beginning it is important to have as much instant gratification as possible. You want to be able to get something on the screen quick and build from there. You want to be able to edit what you create and add on to it easily. Instant gratification is key to staying motivated when starting out, you probably donâ€™t want to be learning a new language while making your game. If you try to learn a new language while creating your game, chances are you will spend weeks reading and have nothing to show for it except knowledge that you have not yet been able to apply to your game. That can be pretty discouraging.Â
Stick to what you know, or go the easiest most comfortable route possible to acquiring skills to start work on your game.Â So if you know a little Flash, use Flash, if you use C++, use C++, if you only use Java, then use Java. There is no such thing as â€śthe official game development languageâ€ť. ALWAYS remember that. Minecraft is written in Java, Super Meat Boy is written in C++, Farmville is written in Flash, some other game people play is written in HTML 5, some other game people play was made on Index cards. The point is: It doesnâ€™t matter. Find a way you can make your game comfortably, and make it with that.
Donâ€™t take that as me discouraging you from learning new languages and working outside of your comfort zone. Once you get the ball rolling, you will want to reach out of your comfort zone and learn new things if you want to grow as a game developer. Worry about growing later, in the meantime get your base established and start coding.
If you don't know any languge and are looking for a place to start, I would recommend Flash, Game Maker, Unity or something similar. All those programs make it very easy to get something on the screen quickly and with a very small learning curve. You don't want to start out with something like C++ if you have no experience with any other programming language and are anxious to start creating your game.Â
What books or tutorials do you recommend?
There are two books I recommend but they are only for C++ development and they are not beginner books at all. They are Effective C++ and More Effective C++. These are more advanced C++ books so if you donâ€™t know C++, do not be like â€śOh I need those to make gamesâ€ť. You donâ€™t.
Other than those two, I havenâ€™t read any other books. The way I learn is by reading SDK documentation. Itâ€™s not very typical, but itâ€™s how I learn.
I do recommend going on line and looking up tutorials for things. The internet is full of example programs, tutorials like NeHe, etc. There are no tutorials that I recommend, mainly because I havenâ€™t gone through any but I do know the resources online are abundant and varying. Iâ€™m sure with a little help from Google you can find exactly what you need.
I DO NOT recommend copying and pasting from tutorials to make your game. You arenâ€™t learning anything that way, you are just copying. That goes double for open source programs. They are fine to look at, study, and reference, but they are not a means of making the game for you. You will not become a good and effective programmer by copying and pasting source code into your game unless you fully understand it. Do not cheat yourself this way, take the extra time and understand something before you use it.
What software did you use to create the game?
I feel when this question is asked, its being asked by people that assume there is a magical tool that makes games for you. Fact of the matter is there are tools that do a bunch of the engine stuff for you. If you arenâ€™t interested in learning a programming language for the purposes of building aÂ game engine look at something like Unity or UDK. They take the heavy lifting away from you and allow you to just create a game. There is a cost to this though. You are limited by the system presented to you with those tools. These tools are full of features that are well built, stable, and amazing, but sometimes they will not do what you want.
Personally I donâ€™t like limitations and I really enjoy having my hands deep in the development so I avoid these tools and build my games from code Iâ€™ve written over the years. Thatâ€™s not to say Super Meat Boy couldnâ€™t exist in something like Unity. It could to an extent. Due to the limitations though it would not be the same game, it would not control the same, and it would not look the same. The essence would be there, but the game as we know it would not be. Itâ€™s up to you though. Again, itâ€™s what you are comfortable with. Amazing games are made with UDK, Unity and the like...and amazing games are made without them.
I use Visual Studio for development, but I could just as easily use Eclipse, Code Warrior, XCode, or Notepad and a compiler. Just like selecting a programming language, it doesnâ€™t matter what you use. Visual Studio is what I am used to. I donâ€™t use any of the crazy functions built into it, I use it as a way to organize my source code files, compile, and debug. Tons of editors do this.
For art and animation, Ed uses Flash. I wrote an exporter for the animations in Flash because it was easier than writing tools for Edmund, andâ€¦againâ€¦Edmund is the most comfortable in Flashâ€¦so why fight it! Writing that tool meant learning JSFL and working in Flash, but it was what worked best for Ed and me for Super Meat Boy. You donâ€™t need my animation exporter to make your game. One day I will offer these tools to developers, but this wonâ€™t happen for a long time so donâ€™t wait for them.
How do you stay motivated to finish what you start?
There is no secret to staying motivated and there really isnâ€™t advice I can give you to stay motivated on your project. Thereâ€™s no special trick I use, or mindset, or organizational task list, or anything like that. In order for me personally to stay motivated, I have to believe in and enjoy the project Iâ€™m working on. If I donâ€™t like what Iâ€™m working on, chances are I will not finish it.
There was a game I started a long time ago called Goo!. I worked on it for 2 years, and it went nowhere. It wasnâ€™t my idea, it wasnâ€™t a game I would personally want to make, and because of that I could never make it what I wanted it to be. I stopped working on the game to start on Super Meat Boy.
The time working on Goo! wasnâ€™t wasted because I learned a lot about development, but the game was never meant to be because it wasnâ€™t something that excited me. The only aspect of the game that did excite me was the multi-threaded physics engine and I spent almost all of my time on that. It was important for me to work on that game because it made me realize that loving the game you are working on makes it much easier to work on. It is the ultimate motivation.
When you believe in and love what you are working on, it is difficult to stop working on it. You obsess over it, you want to add to it, you want to make it better, and you really want to see it completed. Believing in what you are working on tends to shine through in the finished game. You are more likely to spend more time on extra polish, add features you think make the game better, just generally go aboveÂ and beyond and really make the game yours.
How do I get my game on Steam/Xbox/PS3/WiiU/Anything else?
This is a question no one should ever be asking when they are first starting out or even if they have a game they are working on already. Your end game should be â€śIâ€™m going to make a good gameâ€ť not â€śI need to get this on XBLAâ€ť. The path to getting your games on any of these platforms is public knowledge. There is no secret email, there is no magic form you fill out, you donâ€™t need to know anyone in the biz, nobodyâ€™s cousin works at one of these places and can get you a secret meeting, nothing like that exists.
Itâ€™s very simple to be approved for any of these platforms: all you need is a good game. Thatâ€™s it. Itâ€™s a harsh reality that some people refuse to believe. Iâ€™ve seen people scapegoat everything but their game when it comes to getting approved for Steam/XBLA/whatever. A good game will gain attention and serious consideration from platform holders based on its own merits with a little help from you. Talk about your game, be excited about it and if your game is good and other people like it your enthusiasm will spread to others.
If your game is not good, you are going to have a very rough time getting it on distribution platforms. Focus on making your game the best it can be, donâ€™t focus on what platforms you can get it on. A good game sells itself way more than exposure on a platform will ever do.
What if I finish my game and no one wants it?
If you work hard, and you think your game is the best thing ever and you still canâ€™t get on any distribution platform donâ€™t take that as a failure and a sign that you should stop making video games. Very few people hit a home run with their first game. SMB was the first game I ever finished, but there were a few before SMB that went nowhere.
At one point I was a few steps away from getting a Sony deal identical to fl0w and Everyday Shooter for the game I mentioned earlier, Goo!. A change in management at the last minute (literally two days before final papers were to be signed) caused the game to be cancelled and for me to never hear from Sony again. The game wasnâ€™t good and even with the Sony deal it had a chance of never being finished and a very good chance of being a huge failure. It hurt, it stung, but it didnâ€™t stop me.
Donâ€™t let that kind of set back kill your dream either. People might think your baby is ugly...that's fine though. Keep making games. Be inspired by setbacks and one day if you have the strength to push through it, chances are you will realize your dream.Â
Just make your game with whatever you can, start small and worry about other things later. Programming languages and software are irrelevant to creating a game so choose what you are comfortable with or what you want to learn but don't take on too much when starting out. Make sure you make enough progress to stay motivated and keep frustration at a minimum. Love your game, talk about it, obsess over it and it'll be hard not to work on it.