PC Terraria on C# or on C++

s1r0ne

Terrarian
Hello everyone, better is moderators, who can ask developers. Why terraria had been written on C#? Why developers didn't choose C++? C ++ is more optimized, effectively may be better =). I am interested in causes)
 
Whether C++ is more optimised than C# is disputable, and I'd personally argue (as a C# main, by the way) that it largely depends on how you use it. However, that's not what I'm here for, I'm here to share an answer from Red himself, courtesy of the Official - Terraria's 8th Anniversary - Ask Redigit and Cenx! thread. ;)

Question said:
What engine/IDE is Terraria made in, and/or what coding language is it made in? I know the tModLoader mods are made in C#, but I'm not sure about the actual game. I'm interested because coding is something I'd like to, well, get more advanced with (the most I can do is slightly basic modding for Terraria).
Redigit said:
I get asked this a lot. It's made in C# using XNA. I went with it at the time because Microsoft was pushing XNA as the next great gaming framework. They dropped support for it a few years after Terraria came out, so we are now stuck with a dead framework. If you are looking for something to make games in, Unity looks better to me the more I learn about it.

I hope that gives you at least a bit more insight. :)
 
Whether C++ is more optimised than C# is disputable, and I'd personally argue (as a C# main, by the way) that it largely depends on how you use it. However, that's not what I'm here for, I'm here to share an answer from Red himself, courtesy of the Official - Terraria's 8th Anniversary - Ask Redigit and Cenx! thread. ;)




I hope that gives you at least a bit more insight. :)
Thanks a lot. Well, you said that you look in Unity side. You want to say that you will remake terraria on Unity? I think it is not good idea, because Unity will have low optimization may be and players must have powerful PC. I could be wrong :)
 
C++ isn't more optimized, it's lower level.

Terraria would have better performance if written in C or Assembly, IF they'd ever finish writing a version in those.
 
Thanks a lot. Well, you said that you look in Unity side. You want to say that you will remake terraria on Unity? I think it is not good idea, because Unity will have low optimization may be and players must have powerful PC. I could be wrong :)
So just to clarify, I'm not Redigit, I just quoted one of his posts. And there has been no talk about remaking Terraria in Unity as far as I'm aware of, so no worries there. :)
 
C++ isn't more optimized, it's lower level.

Terraria would have better performance if written in C or Assembly, IF they'd ever finish writing a version in those.
I am not a professional programmer, I am a beginner, and I heard from specialist that C++ for default is slower than C# and Java. C++ will be quicker in good hands.
 
Unity would be a huge step backwards IMO
I try to understand how work memory in different OS, and how I should to work with it, how code to graphical renderers. I am studying how game engines working, because I want try myself in this area.
 
So just to clarify, I'm not Redigit, I just quoted one of his posts. And there has been no talk about remaking Terraria in Unity as far as I'm aware of, so no worries there. :)
Can I give a link on GitHub repository or can I give an any link?
 
Can I give a link on GitHub repository or can I give an any link?
I'm not entirely sure what you're asking. You are free to share links to GitHub (provided the repositories don't contain any content that conflicts with our forum rules), but that would start derailing this thread. If you want to share your personal projects, you can either post the link on your profile, or share it in Non-Terraria Creations, Art, & Literature.
 
I am not a professional programmer, I am a beginner, and I heard from specialist that C++ for default is slower than C# and Java. C++ will be quicker in good hands.
Usually yes, but this is with a caveat. C++ is a compiled language. That means it's compiled to machine code to be directly run on a computer. Java and C# are interpreted languages (also known as JIT / just in time). This means they compile to a set of instructions that an intermediary such as the JVM or CLR can run. Since there is that intermediate step in Java/C#, they are usually slower - but unless you're working on something time critical or processing very large amounts of data, the difference is negligible.
 
Usually yes, but this is with a caveat. C++ is a compiled language. That means it's compiled to machine code to be directly run on a computer. Java and C# are interpreted languages (also known as JIT / just in time). This means they compile to a set of instructions that an intermediary such as the JVM or CLR can run. Since there is that intermediate step in Java/C#, they are usually slower - but unless you're working on something time critical or processing very large amounts of data, the difference is negligible.
Java does something in between. It does use JIT, but it also compiles beforehand.

I heard there is actually a processor that interprets Java bytecode directly.
 
Back
Top Bottom