Jump to content
  • Advertisement
michael1987

Help me choose between these programming languages for game dev

Recommended Posts

After much  consideration I have decided to read a book or two on C++ and then get into C# right after. I think learning C++ first will help me understand other languages easier than going C# first and then picking up C++. Guess I better go find a book now, thanks everyone for your input!

Share this post


Link to post
Share on other sites
Advertisement
Posted (edited)

That is a wise decision, i say ! 🙂

I am not sure if there is a single book that covers all of C++. Lua scripting is a perfect add-on to C/C++ imo, chances are you can get away without C# and fully concentrate.

A few additional links for daily use:

http://www.cplusplus.com/

https://en.cppreference.com/w/

I learned C++ with two German books, sorry. But recently a friend told me about a course on udemy (C++ by some guy with a Greek sounding name) she is doing that was available for 10 bucks or so ... can check back if you like.

Don't forget an overview over classic C ! APIs are written in C, use structs and unions and raw pointers for buffer assembly and handling and that knowledge can make your life much easier. You may need pointer arithmetic, etc., maybe earlier than templates and polymorphism. You'll see 😉

Edited by Green_Baron

Share this post


Link to post
Share on other sites
16 hours ago, Gnollrunner said:

I just want to say C++ isn't so bad.  I really don't understand the fear around it.  I think the main problem is it's taught wrong.  If you lean the basics first and then add in the more advanced stuff as you go, you'll be fine. I would learn C first.  Write some console programs to get used to it. Then add in classes and inheritance, then templates and finally the standard library.  Some people will tell you to jump right into "modern" C++ but I think that's where a lot of the problems come up. While that may be OK for some, many people will end up not understanding the basics of the langues and that gets you into trouble. 

When I learned C++ in the late 80s nobody was afraid of it. Most programmers I knew, already knew C and/or Fortran. C++ was just another language. Really, it still is. It's just a bit bigger now so you have to learn it in a few steps.

The big danger when learning C++ is learning outdated idioms that have later been shown to be dangerous, inflexible, unmaintainable, inefficient, or just plain wrong.  Most C++ code out there is crap.  Most C++ book out there are crap.  But even the worst C++ book will give you a better foundation in the language than the best book on C.

The main value of learning C on the way to C++ is as a list of things you should never ever do.

Share this post


Link to post
Share on other sites
6 minutes ago, a light breeze said:

The big danger when learning C++ is learning outdated idioms that have later been shown to be dangerous, inflexible, unmaintainable, inefficient, or just plain wrong. 

Such as?

Share this post


Link to post
Share on other sites
1 minute ago, Gnollrunner said:

Such as?

I'd ignore anything that doesn't cover C++ 17 at the beginning, then relax the boundaries of sufficiently current documentation to C++ 14 after you have grasped the differences.

This, of course, leaves out many great books, but the risk of learning outdated idioms outweighs documentation quality.

Share this post


Link to post
Share on other sites
5 minutes ago, LorenzoGatti said:

I'd ignore anything that doesn't cover C++ 17 at the beginning, then relax the boundaries of sufficiently current documentation to C++ 14 after you have grasped the differences.

This, of course, leaves out many great books, but the risk of learning outdated idioms outweighs documentation quality.

But what I'm asking about is the:

Quote

outdated idioms that have later been shown to be dangerous, inflexible, unmaintainable, inefficient, or just plain wrong. 

Certainly I agree one should try to use up to date documentation.

Share this post


Link to post
Share on other sites

I would strongly advocate against C++ as a first language. All your efforts will go into trying to understand the language instead of developing actual software-design skills. Then the constant flow of undecipherable errors, crashes and lack of visible output can quickly become demotivating.

It's kind of taking driving lessons in a 600HP monster truck with manual transmission which you have to build yourself. It can be done but usually isn't the quickest way to learn how to drive.

Share this post


Link to post
Share on other sites
 
 
1
35 minutes ago, Prototype said:

I would strongly advocate against C++ as a first language. All your efforts will go into trying to understand the language instead of developing actual software-design skills. Then the constant flow of undecipherable errors, crashes and lack of visible output can quickly become demotivating.

It's kind of taking driving lessons in a 600HP monster truck with manual transmission which you have to build yourself. It can be done but usually isn't the quickest way to learn how to drive.

My first real language was C++ and I have to admit that I had some trouble along the way, gave up once and started over a year later, BUT in the end, I'm very happy that I made the choice to have it as my first language. With the knowledge that I built up programming in C++ for a few years, it has become very easy to learn for example C# as a second language.

If you (OP) plan to learn C++ as your first language, my advice would be: 

- Learn modern C++. This has been said a few times already, but I can't stress it enough.

- Show your code to more experienced programmers and have them review it. This is always a great way to learn about new things the language has to offer.

- There are going to be times where you're literally with your hands in your hair because you don't know what error X means or where crash Y is coming from, but nothing beats the feeling of finally discovering the cause of your program.

- Finally, ask people for help if you don't understand something. Don't be afraid to ask "stupid" questions.

Anyway, I wish you the best of luck with game project and learning whatever language you choose in the end :D

Share this post


Link to post
Share on other sites

If you are going to show your c++ code to people try and develop a thick skin. With c++ there is thousands of ways to accomplish the same thing. Every person seems to think they know the best way to accomplish the same goal regardless how optimized your code is.  Most times unless it’s a blatant algorithm error there will be lots of opinions on the best way to go about it. It’s takes awhile but you will learn how to block out the people who say their way is best just because it’s clever and unnecessarily complicated. 

Share this post


Link to post
Share on other sites

  • 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!