c++ game programming

I want to make games in c++ but do not know what is the best option is. I am using code::Blocks on windows. I know there is visual studio express or add-ons to code::Blocks like allegro, openGL or driextX 9. could you explain what is the best and easiest option?
I prefer the SDL library. SFML and Allegro are other popular alternatives. You can keep using Code::Blocks if you want.
Last edited on
Pepsi or Coke? All of these libraries exist because different people have different tastes. What I'm trying to say is that it mostly comes down to personal preference. Some of them target slightly different things, so we would need to know more about what it is you're trying to accomplish. Is it 3D? 2D? 2.5D? Online multi player? Web based? etc.
mostly 2d, I am confused on how to install allegro though, since code::blocks comes with minGW I don't need to install it again right?
Right, you only need one MinGW ;)
ok, so I move the files in lib, bin and include into the corresponding directory in MinGW?
No, you tell your IDE to add the directories those files already exist in to the projects search path. For Code::Blocks this is done under Project -> Build Options -> Search Directories.

EDIT: Header file paths go under the compiler tab and library paths go under linker.
Last edited on
so I get the source code allegro-5.0.10.zip or the MinGW 4.7.0 - zip, 7z
on this website https://www.allegro.cc/files/?v=5.0
then I can place the downloaded folder any where and just add the directry??

sorry I am confused.
Last edited on
You do have to download them first if that is what you are asking. I was trying to say that you don't copy and paste files into the directories of other libraries. There really isn't a reason not to, maybe there is a chance that two different files have the same name but otherwise it's just one of those things that you don't do.
but witch one do I download, the source code allegro-5.0.10.zip or the MinGW 4.7.0 - zip, 7z

on this website https://www.allegro.cc/files/?v=5.0

and I can put the downloaded file anywhere as long as I include it in search directories?
Last edited on
The MingW one is already built for you compiler so that would be the least amount of work if you just want to get started. Knowing how to build libraries from their source code is a pretty important skill to have though.
ok I downloaded the MinGW 4.7.0 a put it where I want now all I need to do is Project -> Build Options -> Search Directories and add the complied file directory? C:\Program Files (x86)\allegro-5.0.10-mingw-4.7.0
Last edited on
It sounds right. Try it and come back if you get any errors.
I got this

|1|fatal error: allegro.h: No such file or directory

EDIT: also tried C:\Program Files (x86)\allegro-5.0.10-mingw-4.7.0\include
Last edited on
The #include statement won't search the directory for you. You have to tell it what sub directory to look in for that header file, in this case that would be the folder entitled "include".

EDIT: To be clear, you need to change your statement to #include <include/alegro.h>
Last edited on
nope. dosent work

just to be clear I needed

download MinGW 4.7.0
extract the folder
add the complete directory to Project -> Build Options -> Search Directories
C:\Program Files (x86)\allegro-5.0.10-mingw-4.7.0\include
Code::Blocks keeps separate settings for the project. On the left you'll see a tree that says project, debug and build. This is because some libraries use different files between the debug and build versions. You need to add this directory to the search path of each of those profiles.
I had to do a couple other things first but that did help

Thank you for your time!!

now I can make battlefield 5!
Last edited on
Topic archived. No new replies allowed.