C++ VS C#
So I'm just getting into game development, and Im starting with unity which uses C#. Eventually I want to switch to unreal, once I have the basics down, but unreal uses C++. So Im wondering if C++ Is a big switch from C#. Will it take a long time to get used to the switch? Should I start with unity and C#, or go right to unreal?
About this post
- Posted
- Archived
- Score
- 5 · 86% up
- Kind
- Text
- ID
- pi09th
12 comments
If this is your first programming language, start with c#. However, you may also want to check out unreal’s visual scripting language called blueprints. You can make whole games with it and it is probably even more beginner friendly than c#. It’ll teach you the fundamentals of programming as well. That being said, I think Unity as a whole is less intimidating than Unreal for beginners (unreal has a daunting amt of menu options/surprisingly ugly UI)
A more precise answer to your question: c++ and c# are both “c-style” languages so, syntactically, they will appear somewhat similar. However, c++ has two features -pointers and macros - that are not present at all in c# but very essential to understanding any of the c++ code used in unreal engine. Learning c# would not really prepare you with respect to those features
My recommendation: I would try out both c# scripting in unity and blueprints in unreal and just see which you like better. Both engines are free, after all.
Ill look into that, thank you for the response.
Actually one more question,
If I take a course that teaches a programming language (lets say C#) but not specifically for game development, will I learn as much application for unity as if I took a course devoted entirely to game development?
Like I said, I'm very new to this so thank you for your help
Depends on what the gamedev course taught. If it taught Unity, obviously go with that. And you cant teach Unity without teaching c#. But if it was of a design course, where you do like paper prototyping, then that’s probably not what you’re looking for. A course that just taught intro to C#, though, would still be very good prep for using Unity.
Personaly I used both, C# and C++ and I must say that switching from C# to C++ slows down your developement process alot. But if you are using C# or C++ in Unreal, its not that big deal because Unreal can do the whole memory management for you.
I would say, if you can write your game in C# do it! Because writing in C++ takes longer and you have to deal with errors more often.
Another consideration for me was the availablity of common libraries. If you write a game yourself in C# you wouldn't find that much libraries because most games are written in C++. But if you use Unity there are alot of very good libraries to use, so that shouldn't be a problem.
Thanks
Lua