Jump to content
  • Advertisement
Sign in to follow this  
Johnell

Starting C++

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

Hi there. I'd like to get into C++ although I'm not entirely sure were to start and I'd also like some help to come up with fun projects to experiment with. I've got quite a bit of previous programming experience in Java and I am fairly comfortable with OOP. I wanna start with C++ because I wanna get an idea of how much it differs from more modern programming languages e.g, Java and C# and improve my programming skills/knowledge in general. I would like to make a 2D game, like pong to start with although I wouldn't mind starting with a console application, if it's challenging enough. What I need help with is basically were to start, advice on a good C++ book, what IDE to use and what tools that's needed to make a 2D game. I will be using a mac for this.

Share this post


Link to post
Share on other sites
Advertisement
well there are many good books on c++,and there also alot of tutorials available.I like tutorials cause they are free.

Share this post


Link to post
Share on other sites

Check out http://www.sfml-dev.org/ for a nice 2d graphics library

Lazy foo has good tutorials for starting in c++ but they use SDL which is another 2d graphics library you could use http://www.lazyfoo.net/SDL_tutorials/

I was never able to get SDL to work with the new Xcode which is one of the reason I switched to using SFML and I really like it better than SDL.



is xcode a good choice for C++?

Share this post


Link to post
Share on other sites
For windows VS2010 C++ Express is an option and a decent IDE. I used http://www.cplusplus.com/doc/tutorial/ to learn the basics of C++ and then moved on to "effective C++" and "more effective C++" to learn.
If you want to move into 3D eventually, you can just as well start with D3D or OGL as 2D in both is just rendering a scene with an orthographic camera, as a side bonus you already know how to do 3D by the point you want to move on to it.

Share this post


Link to post
Share on other sites
I don't know about Mac specific IDEs, but I really like Code::Blocks as a cross-platform IDE. There have been a series of C/C++ Low Level Curriculum articles on the gamedev front page recently. They may be a good place to start (Disclaimer: I have not thoroughly read these articles just glanced over one or two of them).

Share this post


Link to post
Share on other sites

I don't know about Mac specific IDEs, but I really like Code::Blocks as a cross-platform IDE. There have been a series of C/C++ Low Level Curriculum articles on the gamedev front page recently. They may be a good place to start (Disclaimer: I have not thoroughly read these articles just glanced over one or two of them).

I have read them and they are not really beginner material, even though the code used in them is fairly simple this explores what the hardware is actaully doing when you write C++ code. Those articles start getting interesting once you run into the optimised code debugging problem IMO.

Learn the language first then learn assembler as that is a language in it's own right with it's own twists and turns (far less problematic then C++'s).

Share this post


Link to post
Share on other sites
I would recommend learning the C++ language to the point where at least you are comfortale with it and can understand what is going on before you jump into any 2d graphics. Yes, it's a lot of boring reading and trial and error, but it will save you a lot of headache in the long run. You gotta walk befor you run.

Share this post


Link to post
Share on other sites
Make a text based game, no, really, do it. It's worth the hassle.

No matter what you make you'll be learning something specific, even with a text based game you'll be learning about the console a bit, input and output, etc. The point is you'll run into a lot of problems you have to solve making use of the fundamentals of the language. "Oh I need to store this? What kind of containers are there?" or "Oh I need to loop through this, whats this iterator thing I keep hearing about?" Games are a good foundation for learning a language because they end up requiring you to use a little bit of everything. A text based game, in many cases, can be almost the same complexity as a visual game anyway, all the underlying mechanics are still the same you're just detaching the rendering.

Granted I'm being a little gentle in that statement, there is a LOT more to learn for 2d and 3d(loading image files, dealing with sound, rendering, etc.) things like that you don't have to deal with in text, but that's why text is a good start, it gives you a good swan dive into the basic tools of a language.

Share this post


Link to post
Share on other sites
There are a lot of good books out there for C++, and a lot of great tutorials that cover everything a beginner needs. A couple of books I've worked with are:

C++ How to Program by Peter Deitel and Harvey Deitel
Starting Out With C++: Early Objects by Tony Gaddis
Data Structures and Other Objects Using C++ by Michael Main and Walter Savitch
Professional C++ by Marc Gregoire

Starting Out With C++: Early Objects is a really good book IMO. I think Gaddis and his team present the information in a easy to understand format, and they give a good group of practice programs at the ends of the chapters to help you make sure you are getting everything.

If you get bored easy, I'm gonna warn you, Peter Deitel and Harvey Deitel are a bit long winded, and I find it hard to get through some of their chapters, but the information is solid. Also Michael Main and Walter Savitch are pretty long winded as well, but I haven't found another book to replace it.

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!