Skip to content

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?

5 points12 comments
Open on Reddit
About this post
Posted
Archived
Score
5 · 86% up
Kind
Text
ID
pi09th

Author

3
posts
8
comments
0
media
View profile

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.

6 points

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

1 points

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.

2 points

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.

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.