Jump to content
  • Advertisement
Sign in to follow this  
KappaG3

What are the most important things that should make me consider moving to C++?

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

Hello, new user here.

I started to program in C# about a year ago, after having some random general knowledge. Well, things change over time and now I'm pretty confident about my amateur-ish skills in C#.
Lately, though, I'm considering moving to C++. Being used to VisualC# I downloaded its counterpart, Visual C++. Which is good, simple and powerful. Lacks intellisense, but I guess I can deal with it.

Anyway, what really made me consider this option was seeing actual C++ source code. All those "shortcut symbols", pointers and more control over the code were what caught my eye. I'm not entirely sure about what I saw and am trying to code, and this is why I started the thread. Is C++ a viable (and better) option for amateur programmers or is it only useful to more experienced users?

On a related note, what would be a good library to make games in? I'm used to XNA, I think I can shift to something else though. I've heard that it all boils down to OpenGL vs DirectX.

Share this post


Link to post
Share on other sites
Advertisement
Thanks vertex, your answer pretty much covers all my questions.
Speaking of the resources you posted, thanks again. I'll surely look into SDL as I need to get familiar with 2D programming, but is it good if I need to use some 3D models? There's a project I want to realize with a friend (who is in the same situation as me, migrating from a managed language to c++) and it could work in 2D, but I was thinking of making it 3D to learn some more while performing almost every calculation on a 2D grid (Tower defense says enough?). Edited by KappaG3

Share this post


Link to post
Share on other sites
Speaking of the resources you posted, thanks again. I'll surely look into SDL as I need to get familiar with 2D programming, but is it good if I need to use some 3D models?[/quote]

SDL essentially wraps OpenGL to provide its graphics functionality so you could definitely mix the two. There's a sub set of calls in SDL that allow you to operate directly on the OpenGL context should you need to.

There's a project I want to realize with a friend (who is in the same situation as me, migrating from a managed language to c++) and it could work in 2D, but I was thinking of making it 3D to learn some more while performing almost every calculation on a 2D grid (Tower defense says enough?).[/quote]

I should warn you that adding a dimension sometimes complicates things severely. Instead of using sprite sheets for characters, for example, you're now skinning animated skeletons, applying textures to them, etc. If you're new to game programming in general, consider taking smaller steps first. If not, by all means, 2D is - mathematically - a subset of 3D so anything expressible in the lower-order dimension is expressible in the higher.

My opinion on the whole 2D/3D argument is that you should consider carefully what you're getting out of using the extra dimension versus what you're adding to your workload to pay for it. If the benefits are clearly there, then that's enough of an argument for. If not, that's enough of an argument against. In your case, I'm not sure you're going to get anything beyond the "cool" factor. Maybe I'm way off on that, but consider it in any case.

Share this post


Link to post
Share on other sites
Quick addendum: you might want to check out SFML over SDL, I just stumbled across another thread where they were talking about it and it appears to be an object-oriented cousin of SDL.

Share this post


Link to post
Share on other sites
Yeah, it would be strictly related to the 'cool' factor, while being essentially a 2D game under most aspects. That's why I tought that making it 3D wouldn't be such a big deal, but I'll take my time to see and consider what I can do.

@Addendum: Even better, thanks again (again ph34r.png )! Edited by KappaG3

Share this post


Link to post
Share on other sites
I won't comment on whether the move to C++ is wise or not ([size=2]I'm not experienced enough in multiple languages to make that call, I mostly just use C++ myself - it's the only language I know in-depth), but if you do make the move to C++, I'd suggest SFML as a good 2D library... and you can use it with OpenGL if you are going to make the move to 3D. SFML will setup the window and handle input, if you want to use OpenGL (OpenGL doesn't handle that stuff for you).

However, DirectX may be a better option overall - I'm not versed enough in the OpenGL vs DirectX debate... but I am familiar with the SDL vs SFML choice (being very experienced in both), and I'd recommend SFML, but either one is a viable option.

Share this post


Link to post
Share on other sites

What are your objectives? Why do you want to move to the C++ language?

That's what I'm asking in this thread.
Why should I move to it?

Anyway, I've already got enough replies to think that I'll just move to it. I prefer the syntax and it's good to know that I can do more than before, even if maybe I'll need those functions rarely. Edited by KappaG3

Share this post


Link to post
Share on other sites

That's what I'm asking in this thread.
Why should I move to it?


Do you have a bunch of existing code in C++ that's easy to reuse?
Is your team a pile of experienced C++ developers without much exposure to other things?
Does your target platform only support C++, but that's where the money is?
Did your boss/class demand you use it?

These are really the only reasons, given the headaches the language puts on you to use it.

Share this post


Link to post
Share on other sites

This topic is 2200 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.

Guest
This topic is now closed to further replies.
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!