If you are from an adjacent discipline and just want to learn a bit of coding to make your live easier, check out Programming for Non-Programmers
If you are looking for information on how to program your first game, look here: Programming your first Game
This guide should outline the different topics one should learn in order to become a good game programmer.
Acquiring the knowledge in all the topics mentioned here is a multi year endeavor.
While it may take long, this still only covers the basics of each area, so you will most likely spend even more time in some specific areas to become an expert in.
The sources are at the end of the page.
Before engaging with different game related concepts, you first need to learn the basics of programming.
The most fundamental of those is the ability to express one self clearly and precise.
This is what programming languages are for.
You will learn multiple languages in your career with different programming paradigms at their heart.
It has proven that it doesn't matter with what paradigm you start.
So your first language should be be:
The best way to learn a language is to solve problems with it on different scales.
If you are starting out and familiarizing your self with the syntax, then sites like Code Wars, Leet Code and Advent of Code help you.
They each provide small contained problems that can be solved within 10 minutes or multiple days.
But this will only bring you so far.
To learn more about your language, you will need to start a bigger project in them.
What classifies as a bigger problem changes from language to language.
But since you are trying to become a games programmer, try to make games within them.
Try to avoid game engines for this and favor game libraries.
The goal is to learn the language, not an engine.
You don't need to know everything about every programming language.
Languages are tools and therefore there is always the trade-off between familiarity and how well the tool fits the problem.
It is therefore recommended to have one language each that fulfills the following needs:
Now that you learned to speak, you will need to learn how to structure speech.
Software design concerns it self on how to structure programs in a way, to keep them flexible and maintainable.
This is the point where you want to brush up on programming paradigms and programming principles.
Try to understand how they came to be and how they changed over time.
Look back on the code that you have written and judge it by the new things you have learned.
Then try to improve the code.
While learning about software design takes you an evening, if you only learn the high level concepts,
understanding them and being able to apply them in code will probably take the rest of you life.
You will need to lean how to manage your tasks.
How do you create a work environment in which you can be your most productive self?
How to approach software projects in a way that ensures quality?
How do you effectively communicate with you team?
You should learn about basic notions of management, to answer the questions above.
While learning management stay vigilant for false information from certificate mills and consulting firms.
Both have proven to forgo any promises they make for the sake of profit.
Make many experiments your self to validate the information you're receiving.
Measure and compare, not only in the way of Taylorism, but also with an eye on the well being of your self and your co-workers.
You will need to write not only good looking, but also fast code as a games programmer.
Every millisecond saved is worth gold, since it enables you to have a better framerate, better response times and with that a better user experience.
Some optimizations are even so good, that it might lift constraints of the artists on your team.
While gamer often focus on the graphic cards first, the CPU is the first bottle neck that should be understood.
Understanding how threads work on the operating system you are targeting
and how you can take advantage of SIMD increases you ability to process data on the central part that is running your game.
A big part in all optimizations, not only CPU, is caching.
Knowing when to cache, and how to align caches for best traversal is extremely important.
While graphic cards have become widely spread, not all graphic cards offer the same capabilities and power.
Hence it is possible that you'll find yourself stuck implementing algorithms for graphics on your CPU.
Knowing how to implement them effectively, will be important in such situations.
Most GPUs are designed for many small parallel computations.
This changes the way you have to structure your data and think about performance.
Learning how to speak with graphics cards directly with APIs like CUDA
will increase your ability to manipulate the data-flow between your CPU and GPU.
Learning how to program shaders, even if you will not end up designing them, is also important,
because you'll be most likely responsible for optimizing their performance.
Websites like shadertoy allow you to quickly get accustomed to writing them.
Testing is extremely vital to any software project that should run longer than a week.
Tests ensure the correctness of your programs output to a desired one.
This means you can test not only, that you are deducting the correct amount of HP from an enemy,
but also things like minimum contrast in a scene or react-ability of attacks from enemies.
Finding ways of testing such things easily with the toolset of your choice, be it a game engine or something home brewed,
is important to maintain the speed of development and keep the software bug free.
If you have good tests in place, you will also be able to find any bug within a few minutes.
Same as languages are but tools in your toolbox, same goes for game engines and libraries.
While you can certainly make games easily with libraries with just the knowledge of the programming language,
you will not be able to do the same with engines.
Libraries will come in when the features of the engine end or if you want increase flexibility by writing the glue your self.
Hence, knowing at least one popular game engine well and a library for all components of a game (Networking, Graphics, Audio) is important.
The process of learning game engines can be accelerated if you have written games without using one.
This is, because you already know what is needed and you are only learning "how" it's done inside the engine.