Hi …
I’ve enough experience to develop advanced games with Unity and C#, in future, may be i’ll use C++ with DirectX SDK, but NOW I’ve not enough experience in C++, so i WISHFUL learning C++ more and more to become professional C++ programmer, so i have a question:
is my C# experience will help me become professional in C++ or when start programming with C++ i’ll start from start point ?
Start point.
Learning the C++ language is easy, knowing C# would help a lot.
Learning OOP and patterns and assembly (for debugging purposes) and templates and pointers and references and good programming style so you don’t forget to initialize objects, because if you do the program will crash when executing and you will wonder what happen because it compiled fine.
From a professional point of view and if you can afford the trade, better to be exceptional at C# and zero at C++ than good at C# and average at C++.
C++ is not easy at all (= some years needed before you understand what you’re really doing), especially if you want to go deep and manage memory, threads and performance in a competent manner.
I’ve always wondered how c++ compared to c#; which one is harder to learn? Will learning c++ make you a better c# developer (I heard that it will make c# easier)?
Learning c++ ‘correctly’ will make learning c# easier, but only in that you will already know core OOP concepts and the syntax is very similar. I do not believe it would be time well spent, as learning c# will teach it to you without any time lost, and you don’t potentially learn bad habits like using multiple inheritance and learning goofy, mild bug spawning things like initialization lists or have to deal with header files. I would say learning C# will teach a much better style of coding since it was designed by very seasoned C++ coders who tried to improve the language based on decades of use.
I’d go so far as calling learning c++ a form of premature optimization, I say learn c# then learn c++ if you feel you have to, but I’d wager the job market will have plenty of programming jobs for good c# coders.
That’s interesting; it just seems like so much cool tech (including unity obviously) is being made with c++, and I feel like I might be missing out on something not knowing it.
C# is a very new language compared to C++, most of the cool stuff you see using C++ has a history dating before C# was released at all, or before it was a viable choice for a particular application. I did not work with C# during it’s infancy, but the few I’ve talked to that did were not happy with it at the time, so I think it’s likely that it didn’t hit it’s stride till 3.0, which is barely 6 years since release, not long at all when you’re talking about software infrastructure. C++ simply has a ton of support built up over it’s near 30 years of availability, and while C# seems to clearly have the momentum, you’ll still see new applications built in C++ for infrastructure reasons for some time.
i need ask a question may be far from Unity, if i need develop 3d game for PC with C++ and DirectX, is this means i MUST develop 3d game engine first then develop my game ?
No, you don’t have to write your own 3D Engine. One day I’ve tried to learn Irrlicht Engine and actually managed to build a working little app with it. With most engines you can chose DirectX for rendering.
To be honest - If you don’t really have to learn C++, don’t do it. I have been learning C++ for years before I’ve moved to Java and the technicals of C++ wasn’t very usefull. C++ itsefl is easy but almost all aplication architecture using it has something really fucked up, and you spend hours with documentation just to check if you forgot some macro definition.
I understand UDK will be dropping their scripting language in favour of c++ at some point. If I was gonna use c++ in gamedev, I would take a look at that.
I always find the spooky tales about C++ programming amusing. It’s a language just like any other. It takes some time to learn - and a lot more time to master - but it’s far from difficult if you’re coming at it with a programming background. I think people build it up a little too much and discourage people from even making an attempt at it. About the only advice I’d offer is to not learn C++ as your first language, but I think very few programmers would do this anyway.
It’s a language like any other, yes, but where stuff like C# is designed to hold your hand and make things easy, C++ is not. It’s also a much less designed language than newer ones to a large degree. New languages often deliberately leave things out or provide only a single built-in way to do something, where C++ is somewhat of a grab bag of various tools that all sorts of people just keep adding to.
Most importantly, effective use of C++ requires that you know how computer systems, CPUs and memory actually work. Even just being barely competent requires at least knowing how to clean up memory for yourself. Newer languages like C# abstract all of that away and do it for you, to the point where people who only have the vaguest understandings of them can successfully write quite complex systems. Sure, someone who does understand those things could make the system run faster, but in those languages that’s often considered a speciality. (And it’s a speciality often eschewed because managers would rather simple code that anyone can understand than faster code that requires an experienced, and thus more expensive coder, to work with.)
C# is easier than C++ as it comes with many more built-in libraries. With C++, you’ll have to make your own libraries other than the basic IO and Maths stuff.
As someone who programmed in C++ for many years; I thought I’d chime in for a moment. The difference with it, as a language, is not that it’s necessarily “harder” or “more complex” (in time you’ll get used to anything), it’s that it’s bigger than most (all?) other languages. By that I mean that the language specification has grown to the point where noone uses all of it. The downside, as a learner, will be that reading others code will be difficult for much longer than it would be with other languages, since there is so many things to learn to “know” the language. There are also a surprisingly large number of ways to shoot yourself in the foot (although modern compilers mitigate this as much as they can).
If you want to be a very good programmer then learn a lot of languages. They get easier to learn as you go on, and you’ll discover new ways of looking at the same problem; news ways of thinking; which is incredibly useful for someone who’s job is to create something from a blank page.
I can foot myself in the shoot in at least 1/2 dozen languages!
I’d modify that to learn a lot of DIFFERENT KINDS of languages. Java, C# and C++ are very closely related, try learning something off the wall, like a functional language, Prolog was a language that’s really stretched the muscles.
Write everything idiomatically, I can write C# as JavaScript, using dynamic everywhere, and it will run like a dog and be impossible to maintain, C# has it’s own style. I can also do the opposite. Try to learn what the language designer wanted instead of shaping the language to be what you expect.
Actually this is the recommended way of starting in game development. You might loose momentum until you have a decent engine running, while focusing on your game idea and bringing it to screen will motivate you to go on.
A good starting point with DirectX and C++ is www.rastertek.com
Depending on what you consider to be an “engine”, not necessarily.
If by “engine” you mean something like Unity, i.e. a reuseable generic tool that can be used to make many different games, complete with scripting languages etc, then no, you don’t need to write an engine, you could just code the game for DirectX using C++.
If by “engine” you mean the code for loading assets from disk, reading input from the user, and firing off commands to DirectX to get things on the screen, then yes you do need to write your own engine.