Jump to content
  • Advertisement
Sign in to follow this  
superman3275

C++, should I switch?

This topic is 2127 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 started learning C++ some time ago, and feel I am a competent programmer. However I've read using C# and Java makes developing applications and games much quicker, and theres a less steep learning curve. I know about how dealing with bugs is easier in those languages, however that doesn't make me want to switch. Essentially, I am asking if I should switch to C#. I've succeeded in making a tic tac toe game and Simple R.P.G. in C++, and know a lot about the language. I really like C++ and so far have had fun learning how to program with it. So should I give up on C++ and switch to C# now that I'm a few months in. (For clarification, C++ is my first language.

Share this post


Link to post
Share on other sites
Advertisement

Once you've programmed in a sane language, C++ feels SOOOOOOO much *more* painful. I need to make my own ??what??, to do what?? Really..... sheeesh.


C++ is the only sane language.

Once you know c++ there is no reason to use anything else. Unless of course you want the best speed possible in that case you would use assembly (sometimes I use it inline with c++ just for speed). As for making your own code for complicated things you can either have fun and do it yourself or use a third party library.

I tried learning JAVA, I decided it was just like c++ but slower and with too many rules. Edited by ic0de

Share this post


Link to post
Share on other sites
Oh, really? Please, do enlighten us on how you write GPU shaders. Do you cobble them together from C++ macros? Or perhaps you write them directly in IL assembly, hardcore-style? Also, how long does it take you to write a tool that replaces sequences of bytes in a binary buffer? Still waiting, cause in Python I'm done: buf.replace(). Oh, yours is... what? Faster? Oh, but I was only going to use it for a 10kb file anyway.[/quote]

I'm sorry that came of so rudely but what I meant was for making games, yes scripting languages like python and javascript are great for doing small automation and I admit I use them from time to time, but if you are writing games the bulk of it is usually time critical and should be written in a fast language like c++, that said languages like GLSL are useful but they are incredibly application specific, they really just supplement other languages and not replace them.

More specifically c++ is in my opinion the best general purpose language for writing games.

Share this post


Link to post
Share on other sites

I'm sorry that came of so rudely but what I meant was for making games, yes scripting languages like python and javascript are great for doing small automation and I admit I use them from time to time, but if you are writing games the bulk of it is usually time critical and should be written in a fast language like c++, that said languages like GLSL are useful but they are incredibly application specific, they really just supplement other languages and not replace them.

More specifically c++ is in my opinion the best general purpose language for writing games.

That's a lot more defensible (and I'm sorry if I came off as rude, too - it wasn't my intention). I don't really agree too much on the "bulk of writing games is usually time critical" - from a graphics point of view it's all handled by the graphics API and driver so from that perspective C++ gives you no special speed advantage. From a game logic point of view, it is true that performance matters, but usually game logic isn't all that intensive (perhaps AI). Physics can be a bottleneck, but surely you are using an existing library which is already compiled in C++ and has bindings in your language (like bullet).

Of course it's very game specific, some games are more intensive than others. AAA games sure are time-critical, but I'm not so sure a tetris, tic-tac-toe, amateur FPS or hangman needs the full horsepower of a modern processor, so in this case I would happily trade some performance for faster development time, for instance.

I'm not sure I'd call GLSL or other shader languages "application-specific". If anything they're incredibly important since they are the *only* languages that can run on graphics cards, so if you ever want to use the GPU, you must learn them - there is no going around that (though note that OpenCL 1.2 has a stripped-down-C++ kernel compiler now! though you still need to learn the API and how to effectively program with it, no more inline assembly and pointer hacks)

Share this post


Link to post
Share on other sites
There is no right or wrong answer. As many have said, it's not like switching to C# as your main language will mean you can never program in C++ again, so it's completely fine. If you're asking this question, though, it probably means the answer is yes. If you're curious about another language, then do what a little kid would do: Check it out. Don't ask for permission from the guys on the forums. Maybe you won't like many of the other languages. So what? Just stick with C++. Maybe you'll realize C++ is a horrible nightmare. Great! Enjoy whatever new language you're using. As long as you're programming, I don't think it quite matters what language you're using.

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!