Game programming is the branch of programming related to creating videogames for PC, home consoles and arcade. It is not taught as a career itself, rather programmers learn it by self-teaching although there are some few schools that teach that, like Digipen.
This topic will discuss such theme. There will be basic to advanced articles using C language and SDL. If the reader of these series of articles works hard on them and types all the sample code, he could be able to create a simple 2D game in the fashion of Tetris, Arkanoid or even a 2D game if he makes further research. Game programming is a hard task and can only be learned by doing. We chose SDL as a game API because it is the easier library to work with; besides it is very powerful and offers almost all the features needed in a game. Other game APIs, like DirectX and OpenGL require a higher learning curve.
What you need to know as a requirement for these tutorials is knowledge and experience in a programming language. It is recommended that the reader understands C in an intermediate level, because most articles and sample code will focus on that language. Also, it is recommended but not required to know something about event driven programming, maybe on SDL or on Windows API. We will go from there and get to the programming topics related to our task: learning game programming. Also, it is better if the user is comfortable with maths; only algebra and basic physics knowledge (in the physics tutorial) is required.
The art of programming is not like playing video games; it is more exciting, said the creator of Digipen, a video game training company for game developers and 3D artists. To become a good developer of games, first of all you should be a regular player. If you do not know the main types of games that exist you may not be able to develop a game that meets the minimum standards of quality; also, most users will find that it does not meet their expectations. Therefore, the first step is to know which kinds of games are out there to get an idea of what kind of game you are going to implement.
And the most important thing is that nowadays is easier to program games (relatively speaking, because any kind of software is somewhat complex). In the past, to program games for the PC you needed to be an experienced Assembler programmer (Assembler guru) to access the video card, sound and joystick through interrupts and BIOS functions. Today, there are different libraries with specialized functions that ease the development of video games; those are DirectX and SDL, mainly. You use them as you do with any other library... and Assembler knowledge is not needed. Windows operating system is sufficiently sophisticated to avoid having to use difficult functions from the past. In Windows 3.1, for example, memory management was 16-bit and, hence, in order to access the dynamic memory you could not use the classical functions called malloc and free. You had to request the memory, lock it, use it and unlock it. It was a very tedious task compared with the straight use of malloc that you can make in Win32. Even if you use the Windows API functions it is an straight task.
What you need to do now is to master one of these development libraries. If you plan to use DirectX, you must also have basic to advanced knowledge of Windows programming, depending on the task. If you use SDL, (what we do in these tutorials, for simplicity) you only need to learn how to handle this library. SDL encapsulates everything related to Windows (or Linux XWindows, if used in this system) so you never have to make a WinMain or WinProc function. Besides, obviously you need to know programming language (C in this case) thoroughly and know how to compile and run programs. It is recommended to have made several programs in other areas of software development.
On these tutorials, words such as double buffering, flipping page, blitting, sprites and finite state machines will be used often. So check the corresponding articles when you need to know more about each topic.
This topic will discuss such theme. There will be basic to advanced articles using C language and SDL. If the reader of these series of articles works hard on them and types all the sample code, he could be able to create a simple 2D game in the fashion of Tetris, Arkanoid or even a 2D game if he makes further research. Game programming is a hard task and can only be learned by doing. We chose SDL as a game API because it is the easier library to work with; besides it is very powerful and offers almost all the features needed in a game. Other game APIs, like DirectX and OpenGL require a higher learning curve.
What you need to know as a requirement for these tutorials is knowledge and experience in a programming language. It is recommended that the reader understands C in an intermediate level, because most articles and sample code will focus on that language. Also, it is recommended but not required to know something about event driven programming, maybe on SDL or on Windows API. We will go from there and get to the programming topics related to our task: learning game programming. Also, it is better if the user is comfortable with maths; only algebra and basic physics knowledge (in the physics tutorial) is required.
The art of programming is not like playing video games; it is more exciting, said the creator of Digipen, a video game training company for game developers and 3D artists. To become a good developer of games, first of all you should be a regular player. If you do not know the main types of games that exist you may not be able to develop a game that meets the minimum standards of quality; also, most users will find that it does not meet their expectations. Therefore, the first step is to know which kinds of games are out there to get an idea of what kind of game you are going to implement.
And the most important thing is that nowadays is easier to program games (relatively speaking, because any kind of software is somewhat complex). In the past, to program games for the PC you needed to be an experienced Assembler programmer (Assembler guru) to access the video card, sound and joystick through interrupts and BIOS functions. Today, there are different libraries with specialized functions that ease the development of video games; those are DirectX and SDL, mainly. You use them as you do with any other library... and Assembler knowledge is not needed. Windows operating system is sufficiently sophisticated to avoid having to use difficult functions from the past. In Windows 3.1, for example, memory management was 16-bit and, hence, in order to access the dynamic memory you could not use the classical functions called malloc and free. You had to request the memory, lock it, use it and unlock it. It was a very tedious task compared with the straight use of malloc that you can make in Win32. Even if you use the Windows API functions it is an straight task.
What you need to do now is to master one of these development libraries. If you plan to use DirectX, you must also have basic to advanced knowledge of Windows programming, depending on the task. If you use SDL, (what we do in these tutorials, for simplicity) you only need to learn how to handle this library. SDL encapsulates everything related to Windows (or Linux XWindows, if used in this system) so you never have to make a WinMain or WinProc function. Besides, obviously you need to know programming language (C in this case) thoroughly and know how to compile and run programs. It is recommended to have made several programs in other areas of software development.
On these tutorials, words such as double buffering, flipping page, blitting, sprites and finite state machines will be used often. So check the corresponding articles when you need to know more about each topic.