Jump to content
  • Advertisement
Sign in to follow this  
Aro2220

Where can a beginner learn about the C++ compiler and Visual Studio 2015 (I want to use SDL)

This topic is 975 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

I'm new.

 

I would like to learn C++ and to use an extensible language like Lua together for game development. But the first thing I need to do is really understand my environment and the compiler.

 

I would like to use SDL for some simple graphics so I can practice some simple programming in C++ and then move on from there. However, I'm having a devil of a time understanding how the compiler works and how to install and use SDL in Visual Studio 2015 so I can include its libraries and start coding. Setting up the environment and this cMake thing is just a bit over my head at the moment.

 

What I could use is some direction / a good book / tutorials / a tutor (I can dream) in understanding how this works so I can understand my compiler, what cMake does and how the Visual Studio 2015 IDE is used to set up something like SDL for use on a Windows 7 (soon to be 10) machine. 

 

In other languages I have dabbled with (like Python and C#) installing a framework was usually done for me. I'd be given an executable, or I'd just run a simple pip command, and everything would be ready to go. Then I just do some kind of include statement for the libraries I want to use and off to the races I went.

 

But with C++ and SDL it's more complicated -- more low level -- and I really don't understand all of it so when things don't just work I'm not sure how to troubleshoot. There seem to be many different compilers for C++ with a lot of differences and well....it's just a massive and mature language with 80 ways of doing the same thing, and while I don't mind learning, I really need a more productive way of educating myself. Out of all the programming languages I have looked into, C++ seems the most complicated one to get an overview of since it's just so massive and there are so many different ways of using it. I'm not sure that came out the right way.

 

Thanks for reading my post and any time you spend responding.

Share this post


Link to post
Share on other sites
Advertisement
My post is probably not going to be very informative or useful. but I really hate the setup process of SDL. Its goddamn hard. This is why I don't use it (and because of the old D3DSDK dependency).

Share this post


Link to post
Share on other sites

I agree SDL wouldn't have been easy for me to install if I'd have to do it by myself. I was quite lucky to find these tutorials which helps a lot in my opinion. He does not cover cMake though.

 

Could you elaborate on what you mean by 'understanding the compiler'? It seems a rather broad question/topic to me.  

 

On a side-note, the mentioned c++ tutorials go over game-oriented basics of c++ including challenges in which he shows how to make text based games (and later on including rendering with OpenGL/SDL too). Even though you already appear to have some significant programming experience, taking a look into a few of these may help your understanding of c++ and his challenges provide a good exercises if you ask me. There's definitely stuff that you will already know, but it's easy to skip over such videos. Again, this has helped me and doesn't necessarily work as well for everyone out there, but you can give it a shot. 

 

Of course the guide provided by Nanoha is a good start as well, same for the advice he gave: do something with the console instead if you feel it's a bit too much. Text-based games are fun to make too!

Edited by AthosVG

Share this post


Link to post
Share on other sites

Google leading me to MSDN webpages has been a great help to me in regard to visual studio.  Do you know enough to know what to search for or have enough experience with VS to know what to ask?  Or do you need something from the ground up?

Share this post


Link to post
Share on other sites

If you want a beginners introduction to SDL 1.2(and a transition chapter for 2.0) then I recommend "The Black Art of Multiplatform Game Programming" by Jazon Yamamoto.  Its not a big book but it sure does cover the important things like setting up SDL with Code::Blocks for Windows and Eclipse for Linux.  Compared to a behemoth like Andre Lamothe's "Tricks" books, this one is refreshingly light and covers the topics a complete beginner are looking for, whilst being a quick-start guide for those of us who are familiar with game programming.

 

Its worth learning how to write simple C/C++ programs in notepad and then compiling through the command line to avoid a nasty future of header/library linking errors.  GNU Make is a bit of mystery at first, but the first chapter of the GNU Make manual explains it well.  Once you understand how to compile and link programs without an IDE then you can use such programs with confidence.

 

You can get by with Code::Blocks and Jazon's book, but do set aside time to learn the basics of compiling and linking.

 

Best of luck!

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!