3 ms·
I'm going to be blunt, almost all the comments thus far suggesting a specific language are wrong. This happens everywhere, every time someone asks this question
by optionalparens 10y ago
I'm going to be blunt, almost all the comments thus far suggesting a specific language are wrong. This happens everywhere, every time someone asks this question. I would instead pay much more attention to anyone speaking generally about problem solving and learning. I've learned countless programming languages and eventually you'll get to the point where learning a new one is just a matter of spending some time with it on a project. You're not married to any language ever unless you're a terrible programmer, so you can always switch to something else and at most, you've lost time.
My suggestion would be to pick a problem, analyze the problem deeper to see if it's even worth solving, then proceed from there. That alone is a huge subject, but it's really what you need to be comfortable with if your goal is to be a programmer. If you simply want to have a language or two as tools (ex: scientists), then sure, dive right in, but you will forever be stuck at a certain level if you approach things that way unless you are really lucky or really brilliant (most of us are not). Otherwise, take the time on the problem you want to solve, first and foremost, every time. The problem generally (obviously some exceptions) has little to do with language, computers, or anything technical, even if the problem is actually focused on a computing topic. If you still want to solve the problem after doing things like figuring out who/what/where/when/why, then try to pick the language(s) and tools that best fit the problem. Unfortunately it is hard to do this without having programmed in a language yet, but you can at least do some basic research, reading, and so on to find the best tool for the job.
You will fail in this your first time, and probably your first ten or even 20 times. Most programmers fail in this their whole careers, so do not get discouraged. The best you can do is learn from your mistakes when trying to solve problems with technology, and try to do better the next time. Even if you fail to pick the "best" tool for a job, making a mistake will teach you so much and you'll build on this going forward. This also means you can always change languages if you think it won't work for your next project or you just want to learn something new. Getting things done, learning patience, solving problems, critical thinking, balancing everything, and countless other non-technical things are really what it's all about and learning them will keep you going. Language choice can save you lots of time, lead to better results, and much more, but it often is just a distraction for the average problem.
You mentioned you wanted to make a game. I would say 99% of programmers I have ever met say this and very few of them have gone on to make games at all, and even less, professionally. Saying you want to program a game first is like saying your first race will be an ultra-marathon with no training. I am not trying to discourage you, rather I am trying to be real and help you think about what goals you want to set for yourself. For reference, yes, my first program was a game, but this was a long time ago and I'd say it's a miracle I continued.
I have worked on games and game engines professionally and would be happy to discuss more things related to the learning process. To avoid being "that guy" who never gives any specifics and is just a contrarian, I will tell you the honest truth as it has been for a long time in game programming -- If you want to be at all decent at game programming, you must learn C and C++, and eventually at least a decent understanding of assembler would really help you. Anyone who tells you otherwise is wasting your time, lying, and/or has never written a game (why this is would be a huge post). You can be productive and write good games in any language, but if you are anything like most of us, one day you will want to write a game that is not just a toy, text-based, or a glorified web page. There's nothing wrong with those games if that's your thing, but I've rarely met anyone who has the long-term goal of writing those games except for spammers, crazy people, or unscrupulous people (ex: Zynga). Again, that's not to say your game has to be written in C or C++ (you can write amazing games in C# using Unity for instance), but having command over those languages still teaches you so much of how a computer works, how to optimize games, and will save you when eventually you'll want to communicate with things written in those languages and not treat them like a magic black-box. For the goal of being a game programmer, it's a good use of time even if you never write anything professionally in C or C++. It's less about the mechanics of C or C++ and more about learning how things work at lower-levels and expanding the size of your "safe" zone mentally. Likewise, you'll want to learn quite a bit of math for most game programming, be in matrices, algebra, geometry, calculus, diff eq, etc. So you may not even want to learn C or C++ as your first language, and that's fine, just know that long-term if you are serious about games, you will have to do that. The message is that you need to focus on computer science skills, not language specifics in order to work towards that goal, even when working in other languages. In the process of doing this, you will learn a lot more about what I said earlier - picking the right tool for the job, which means not just languages, but libraries, editors, formats, algorithms, etc.
Building a game, at least remotely well, requires quite a lot of skills that are far beyond a new programmer's abilities and it is nearly impossible to master them all in a lifetime. You need to learn the basics first and to understand your limitations and resources - you won't be building a AAA or even a nice looking indie game for a long time unless you are truly exceptional, lucky, or have a team of people doing it mostly for you. At best, you'll produce something that on the surface works, but your programming ability will suffer and if you eventually do work with competent people, they will think you are terrible or hate you. That said, building a game will require you to learn so many areas and thus teach you more than almost anything the best way - hands on. It's a balance of getting things done and doing them right, and knowing where, when, and how to cross that line is vital. When you first start, you won't even likely have any ability to filter out all the information out there that is wrong, will waste your time, is bad design/BS/awful. Some programmers never learn this, but this too is hugely important.
I strongly advise you to see if programming is something you even want to do first, figure out what you like to do, where are your deficiencies, and work from there to figure out what your role would be in game dev, where you need help, how to judge others, etc. A game can be a motivator to learn more and teach you things along the way, but it can also drive you away, overwhelm you, teach you bad habits that you will never shake, and generally lead you astray. As such, just writing simpler things that solve real problems might get you there faster and sharpen your skills better along the way, while ensuring you don't throw up your hands. You might be different, but that's the pattern I've seen in most people. Pick a reasonable, small problem you care about, match the tools, go from there, repeat, potentially with new languages after you get comfortable programming for awhile.