How to start with game programming in C++?

I have made a lot of games for dos through qbasic and turbo C and now, I started coding for windows(I like to make games for dos because it utilizes my brain without putting any heavy load). I have little knowledge about 3D game programming(converting 3d coordinates to 2d, 3d rotation and gouraud shading) and much knowledge about 2D game programming. I don't know how to include graphics in c++. I use visual studios, code:blocks and dev c++. I want to program only on code::blocks or dev c++. I have tryed using graphics.h and winbgim.h with libbgi.a but it responds giving a message that the program stopped unexpectedly and i have only one button on the message window, that is "close program" and I get no errors. So how i using graphics in code::blocks or dev c++?
Last edited on
Use a decent library, from this century.

SDL is good https://www.libsdl.org/
SFML is also good http://www.sfml-dev.org/

There are other options as well.
I can't setup SDL 2.0, in the zip file, there is a .dll file and a .txt file, nothing is writted in the txt file about setup of SDL
First of all, you need to focus on something.

Many of them out there will surely recommend you to learn one of the best 3D graphic frameworks (Direct3D, OpenGL, Vulkan...).

Think about what you want to do in your life.

You wanna be an Engine programmer?
You'll have to deal with sounds, physics, math, geometry (a lot), rendering...
An Engine programmer makes Engines, not games.
Games are built from Engines.

It's hard. You will have to write a LOT of lines of code just to make a 2D ball move to the left and to the right
Ï
You wanna be a game programmer?

Take the Game Engine you feel most comfortable with and start making your game.
Don't waste your time reinventing the wheel.
Last edited on
I can't setup SDL 2.0, in the zip file, there is a .dll file and a .txt file, nothing is writted in the txt file about setup of SDL



I'll let you in on a programmer's secret. There's a website called "The Google" where you can search for information. If you search for "how to setup sdl2" you'll find it shows you a list of webpages. The top one is this:

http://lazyfoo.net/tutorials/SDL/01_hello_SDL/windows/codeblocks/
"Moschops" thanks for this wonderful tutorial, I'll try it later today. And i want to be a game programmer, my mind might change later.
And i really like to program games without an engine, i get to know lots more. I have a friend, he uses python and wants to a cryptographer(not sure about the spelling) he is learning some hashing or something and he uses some library of python for RSA Cipher data encryption. he is stuck somewhere because does not have any idea about a function which converts text to integer which is required for his encryption, hee does not know how the function works and he finds some bugs in the function which he is unable to fix.
Hey Thomasb,

Everyone has their own views on where and how to start game programming. In the industry, remember the three things you need:
1.) Quick to market
2.) Make it within budget
3.) Make a quality polished product

Now, pick two but not all three. Most people recommend getting a third party engine, while agreeing to whatever license, and get your game out there. Although, I've been part of a tech industry where they used third party tools to make there product, and over a short time (10 years) the annual tool license cost more than they could afford and put the company out of business. Although, I do believe libraries are safe to use.

Programs are organic in my opinion. They grow and mature as you design and develop them. You can watch game studios improve their games and add more features with each story/version. With that said, you have to start somewhere, unless you are Mr Jobs or Mr Gates, it's not going to be groundbreaking. Set some small goals and build your first game.

Feature creep is where as you add a feature you want to add more and more cooler features which would be better than what you are writing now. I would recommend writing them down for your next version, and get your current project done. I've seen people add 200 extra hours of code every 40 hours of coding they get done because they've got a better idea.
Start somewhere, finish it, and then build onto it for your next version.

The following is some helpful YouTube playlists I would recommend when starting out in C++.

Extra Credit: (The industry and Design)
https://www.youtube.com/playlist?list=PLB9B0CA00461BB187

Moosader: (C++ courses)
https://www.youtube.com/playlist?list=PLKn0qY-z6s8tPgz3-Beb4ewcQuBEuPRKH

Poverty: (Game Coding Blog)
https://www.youtube.com/playlist?list=PLMRh0FZClMrOk9EyDKFw9U5YsOvkCA6vS

I hope this helps.
Topic archived. No new replies allowed.