Jump to content
  • Advertisement
Sign in to follow this  
Magic Karp

Learning by Starting a minor 2D Project. Need help with Setting up the IDE

This topic is 1550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey there mates!


Ehrm first of all thanks for spending some of your Time here trying to help me! Thats awesome!



So to give all Informations I have I ll make it quite long, if you dont want to read that stuff (Maybe you dont need to know it), then just skip right to the TL;DR Part please. Thank you!


So first of all I wished to get into Cpp. So I was all like: Oke first of all you need to learn about the basics.

So I first worked throu the complete Tutorial from www.cplusplus.com --> http://www.cplusplus.com/doc/tutorial/

After finishing that I thought I'd need some practise, some small projects to learn the Rest by doing. So I tried some minor things and was all fine and good. Then I was all like, thats awesome, I d like to get deeper into it, let's start with one of my Favourite Gametypes, since that should be challenging enuff for the beginning, but not overwhelming, so that I still can manage it alone with some Nights of Researches. : P

I wished to program a Towerdefense. A simple one, got my Ideas and stuff, but I needed to get away from those Console Applications, the Question was how?

So I read about DirectX and OpenGL and Stuff and decided to go for OpenGL. Then there was like: It only provides simple Graphics you need the libraries to actualy work with em. Oke no Problem, lets see, there was glut but I did read SDL should be simpler for the beginning and for minor projects. So I tried SDL.

After like 3 Days of trying to somehow integrate that into Code::Blocks and get things going, I figured, it is impossible for me, some Linker Error I had guesses but I just could not fix it.

Okay shit happens, lets try glut. After 1 Day of researches on how to get things going with Forumposts from like 5 Years ago, I found one saying glut is outdated, you have to try freeglut.

So I tried freeglut and while being on the research on how to set this thing up, I found a Youtube Video which said the Best one for Cross Plattforming would be GLFW.

Since Freeglut did not work anyhow, I was like, what the heck, if its the best one for my purposes, then I should go for GLFW. After 2 Days of trying now I really really really feel bad. I just cannot get things going.


So my Question now would be:

Which IDE would you suggest for me to use to program 2D/3D Things (I did read that Code::Blocks is outdated (If you want to start a new GLFW Project it looks for an old GLFW header file and the same for SDL and glut also I think), so maybe some other one would be better?)?

In Terms of Compilers I was working with Mingw so far since I read that its quite the most solid one for my purposes, would you guys agree with that?

And the Last and most important question:

Can you help me get things started please? I would not mind searching for Code and stuff, but not even getting the IDE set up is so frustrating. So insanely frustrating. Please help me with that.






I want to start some minor 2D Projects to get more and more into CPP and Game Development and would like to ask you guys to help me setting this up, so that I can start experimenting with Code and its behaviour.

What I would need advise for is:

Which IDE would you recommend. Which Compiler would you recommend? OpenGL or DirectX or are there other possibilities? All for Cross Plattform Applications (Would like to make them run on Windows + Linux in the End).

And the Final and Most Important thing:

Can you guys please help me set this IDE up, so that I can start my first 2D Project (Which will be a simple Tower Defense Game to get into that whole Thing).





Thank you guys very much, I would appreciate any help since I am quite desperate already right now!



Share this post

Link to post
Share on other sites

You asked a lot of things there, I'll try to answer most of them.


About your first game, I know you didn't ask for this, but it's worth mentioning that "a simple tower defense" is not a simple game. The games that most people recommend for people who want to make simple games are things like Tic-Tac-Toe or Pong. A tower defense has too many things for you to look at once. You sure need some AI for the enemies, but in games like TicTacToes or Pong you can make them for 2 players and forget about the AI. You'll sure need collision detection for the bullets, but you can make TicTacToes without using collisions.


Before answering your question, I have one big advise that can be applied for most of the answers. Don't worry too much about "the best", you'll never find a universal answer for those kind of questions (be it the language, the tools, the technics used...), it depends a lot on your taste. I might recommend SDL and Visual Studio as the best while other would hate both or the combination. I know you didn't asked for "the best", but with what you told about SDL, glut and freeglut it sounds you are discarding things for that reason. Since you are a begginer, everything should work for you. You're learning, and most of the times the discusion about "the best X" has complex arguments that don't make much difference to someone who's just learning.


Anything will be good if you want to learn, use SDL, freeglut, GLFW, anything you want. Don't take this the wrong way, but you won't create a master piece, and if you spend 2 months and decide to change it won't make a lot of difference. What I mean is that you won't be wasting time, probably some of the things you'll learn can be done in a similar way in other libraries, and 2 months less or more using a particular library won't make you an expert.


For the IDE you have some options that work on Windows and Linux, and some options that only run in one of them. In Windows most of the times the IDE already has a compiler, so you don't really have to worry about it. You can install Visual Studio Express for C++ and compile things with the default settings. If you are searching for a compiler you should know what to look for, if you are not sure about it use the one that comes with the IDE.


You said your goal is to make a game for Windows and linux. This is another thing that I see useless from a learning point. It's something that would slow you down while learning game programming, since being multiplatform is not a "gaming" aspect of the application you'll create.


I know my answers my not be what you expect, but you're trying to cover a lot of things at once that you can ignore for now. Once you have more experience setting up an environment and once you know more about how to create a game you can start trying different combinations of IDE, compiler, libraries, etc, etc.


EDIT: About setting up a library in CodeBlocks or another IDE, there are TONS of tutorials, and even for outdated ones the idea is always the same. I don't have a tutorial to recommend, but share one you've tried and the exact problem you had (the console output) so we can help. Repeating what tutorials already explain won't be of much help.

Edited by DiegoSLTS

Share this post

Link to post
Share on other sites

Hey there,


Thanks for the Answer so far!

Actualy I am fine with everything, as long as I can get "starting". The Tower Defense was not meant to have an AI, just Creeps walking down a path automaticly with you building towers next to that path. But I ll overthink it and probably make a "Same Game" is the name I guess? first then.



So, lets see, I tried like overall lets say ~10 Setting things up Guides, but lets try it with this one again, sincei ts especially for SDL 2.0:

or in Text Form:


I did both in my desperate search for a solution.


So I made all th at and now the Error I had back like a week ago appeared again:



So if I try for example, to run the example from there:



it gives me some fatal error.


Would you know how I can fix this?


I am using Code::Blocks 13.12 with the GNU GCC Compiler. 


Thank you!



Edited by Magic Karp

Share this post

Link to post
Share on other sites

You are charmingly fast! : D


Thank you, wow....


welp, it did work I d say!

That is charming, thanks. I did try like every SDL Build and tutorial I could find, but none referred to that solution, it always worked for the makers instantly so I thought I had a linking error or something since everyone just said in forumposts that it is most likely a linking error.

Wow, it did really pay off registering and asking here. Thank you very very much!


Would I be allowed to ask 2 more Questions tho?


First one woulc be:

Which DLLs do I actualy have to include into the Project Folder so that it works properly? Cant I actualy make it that I do not have to copy them all the time, by just putting them into C:Windows/System32?

Dont wanna mess with Files there on my own without asking. : S

Tho if I wanna try these Things on other computers, how do I get them running (To for example send the "finished" game to a friend so that he can tell me if he likes it or not)?

((Sorry, appearently its more than just 2 Questions)).


Second one would be:


Since you are so nice and helpful, may I ask you for advices in Future too, if I need them? Just asking, you ofc can just say no if I d bother you too much. 


Thank you really much for your help tho, after like 1 Week of Trying... You got it solved in like 5 Minutes, I feel like I am quite really really bad. Thank you!



Share this post

Link to post
Share on other sites

Great! Glad it helped.


You're always allowed to ask more questions, but if it's not on the same topic you should open another thread. That new question is related, so don't worry (though I'm not a moderator, so they would check that).


Every time a program needs a DLL it first search in the same folder where it's running, so you can share the .exe file and the .dll files together. If the file is not there the system will look in more directories, until it finds the DLL. The order is this: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682586%28v=vs.85%29.aspx#standard_search_order_for_desktop_applications


Be aware that "the folder where it's running" may not be the folder where the .exe file is, but most of the times it is since you double clic the exe file or a standard shortcut.


Anyway, it kind of depends on which dependencies your project has. For SDL you can share the DLL files, but if you use .NET framework you can share the .Net framework installer and it will take care of placing the DLLs where they belong.


You can ask me more questions, but maybe you'll have more luck creating a thread, so more people could see it. For that error I just searched "winapifamily.h missing" on google and shared the first post in stackoverflow, it was kind of lucky that it was exactly what you needed. If you crate another thread and I can help, I will.


EDIT: I missed the part about System32. Yes, if you put DLL files in System32 you won't need to worry about them again for new projects, it's one of the places where Windows will search and it shouldn't produce any issue.

Edited by DiegoSLTS

Share this post

Link to post
Share on other sites
You should watch all the videos here:

Specifically the ones called "linked errors" and "static linking vs dynamic linking"

Basically you will need to put the corresponding dll's (DYNAMIC link libraries) for every .lib (STATIC library) that you use in your project.

As for your IDE question, on Windows I would recommend Visual Studio (express version will work great for you) as a "traditional" notepad-type ide, but I would recommend learning Vim (or Emacs but I don't know much about it) for cross platform development in the future because it is super feature-rich, customizable, and more powerful than a traditional IDE for code editing, plus it will run perfectly on Linux and Windows. However, Vim does not have a built in compiler so you'll need to learn to use the command line compiler (and Makefiles, which make your life so much easier for compiling more than a couple files).

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!