New to C++, could I get advice? (switching from C#)

Started by
17 comments, last by Dagz 12 years, 1 month ago

First of, I'm a C++ engineer for almost 12 years now.


How come that every single time somebody starts like this on a forum the post ends up being ahemm... pretty incorrect? :P

Stefano Casillo
TWITTER: [twitter]KunosStefano[/twitter]
AssettoCorsa - netKar PRO - Kunos Simulazioni

Advertisement
Okay thanks guys, I'll take your advice and stick with XNA and C#. I'm suprised I got 9 replies in only one day, this community must be quite active.

If you're not able to finish a game in XNA you will never be able to finish it in C++. That's my practical answer.
Dittolaugh.png
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe

First of, I'm a C++ engineer for almost 12 years now.

You mean "you're a C++ engineer from 12 years ago"? The rest of your response might make more sense in such a context.

I don't think this is the place for a line-by-line look at your post, which would be rather off-topic in the current discussion, but suffice it to say that some of your views about C++ standard library and compiler support (both of which are actually quite good) don't really apply any more, or are only relevant when talking about embedded or console development that would not be of interest to a beginner.

I do appreciate the main point you were trying to make in support of C# and XNA, but misinforming a beginner about some of the problems with C++ isn't really a good way to make the point. smile.png

- Jason Astle-Adams


...because of the low-level access it gives ([color=#FF0000]bitwise operations...


Low-level? "You keep using that word. I do not think it means what you think it means."

Whether you should learn C++ or not depends a lot on why you want to learn it. If you want to learn it so that you can make games that run faster, don't bother. If you want to make games that are cross-platform, java might still be a better approach. If you want to simply develop your skills, I highly encourage it. If you are hoping to work on games for a AAA studio someday, I would consider C++ a must; although, you can probably get in the door with C#, as a lot studios develop tools in C# because it is quicker.

You won't get your foot in the door with only knowing C#, at least not on a game team that is using C++ as the main game language. The games industry doesn't really allow you to learn a language from scratch on the job if that is the main teams language. Now learning C# on the job however does happen, but defenitly not C++ from a beginner level, your application will be looked and and discarded if the job requires C++.

Worked on titles: CMR:DiRT2, DiRT 3, DiRT: Showdown, GRID 2, theHunter, theHunter: Primal, Mad Max, Watch Dogs: Legion


The major pro's and cons of the two seem to be that opengl is more powerful and efficient and can run on practically all hardware, where as directx is weaker and lacking in these qualities but much easier to learn.


:/

I am rather curious about where you heard this as OpenGL is known to be easier to learn than DirectX and both are equal in terms of what can be achieved (although I prefer the way DirectX is structured).

Anyway you dont have to leave C# to use DirectX / OpenGL, theres well known stable wrappers that have all the benefits of DirectX / OpenGL, have a look at SharpDX, SlimDX or OpenTK and if you are still worried about performance, which tbh you shouldnt be as the performance difference is unnoticeable, have a look at http://code4k.blogsp...11-apis-vs.html it is an old thread and I typically avoid benchmarking articles but it does give an idea on how close C# can be to C++

[color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

Also, don't fall into the flame wars..OpenGL, DX... learn it all, leave the flame wars to clueless teenagers.

[/font][/quote]

This.

Comparison wars happen with everything, ranging from programming to politics (theres even a Egg vs Tofu war :S), nothing except for flaming and bitching occurs in these wars, the smart people are the ones who learn both areas. In the end you will likely get flamed for anything you use, I get slack all the time for preferring SQL Server over MySQL and picking .net over Java. However as one evil genius once said (and I love this quote) "You can either succeed in one area, or ultimately fail trying to master two", this isnt to say you should stick with C# for the rest of your life, its to say take one area at a time.


[quote name='Dagz' timestamp='1331604151' post='4921543']
The major pro's and cons of the two seem to be that opengl is more powerful and efficient and can run on practically all hardware, where as directx is weaker and lacking in these qualities but much easier to learn.


:/

I am rather curious about where you heard this as OpenGL is known to be easier to learn than DirectX and both are equal in terms of what can be achieved (although I prefer the way DirectX is structured).

Anyway you dont have to leave C# to use DirectX / OpenGL, theres well known stable wrappers that have all the benefits of DirectX / OpenGL, have a look at SharpDX, SlimDX or OpenTK and if you are still worried about performance, which tbh you shouldnt be as the performance difference is unnoticeable, have a look at http://code4k.blogsp...11-apis-vs.html it is an old thread and I typically avoid benchmarking articles but it does give an idea on how close C# can be to C++


Also, don't fall into the flame wars..OpenGL, DX... learn it all, leave the flame wars to clueless teenagers.


[/quote]

This.

Comparison wars happen with everything, ranging from programming to politics (theres even a Egg vs Tofu war :S), nothing except for flaming and bitching occurs in these wars, the smart people are the ones who learn both areas. In the end you will likely get flamed for anything you use, I get slack all the time for preferring SQL Server over MySQL and picking .net over Java. However as one evil genius once said (and I love this quote) "You can either succeed in one area, or ultimately fail trying to master two", this isnt to say you should stick with C# for the rest of your life, its to say take one area at a time.
[/quote]


It is perhaps worth mentioning that the benchmark you linked primarily measures the cost of API calls (native calls have quite a bit of overhead in managed languages), The overall performance difference in an actual application will most likely be far lower.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

:/

I am rather curious about where you heard this as OpenGL is known to be easier to learn than DirectX and both are equal in terms of what can be achieved (although I prefer the way DirectX is structured).

From people who I suppose were no better informed than me.

Anyway you dont have to leave C# to use DirectX / OpenGL, theres well known stable wrappers that have all the benefits of DirectX / OpenGL, have a look at SharpDX, SlimDX or OpenTK and if you are still worried about performance, which tbh you shouldnt be as the performance difference is unnoticeable, have a look at http://code4k.blogsp...11-apis-vs.html it is an old thread and I typically avoid benchmarking articles but it does give an idea on how close C# can be to C++[/quote]
Thanks, yes I have descided to stick with C# and continue using XNA. I'm planning to start trying to duplicate many of the features of the game Ragnerok Online. I love tilebased/3rd person/mouse action games like RO, and I'd like to make one like it some day. Happily I've found a website that's ripped a ton of sprites from the game, creating graphics is such a hassle :P

This topic is closed to new replies.

Advertisement