What is better JS or C# for creating RPG ot RTS?

?

Use whichever one you’re familiar with

It’s really like saying “Which makes a better soup bowl, steel, ceramic, or crash-absorbent plastic?” Well, you can drink from all of them, so it’s a matter of personal preference.

They’re both fine.

for RPG js is better, for RTS C#

Cobol

Can you explain why?

If you are starting from scratch i recommend C#…but this is just a recommendation, and in the end I’m sure you would make both work. I’ve used both and more. I just find that, once you get the basics, C# is easier to follow and creates cleaner code overall, with less mistakes and debugging.

There IS one big consideration, which is the environment you will actual write code in…the IDE (Integrated Development Environment). These are more than just code editors. They will show you what is available while you type, handle auto-completion so you type less. I think I’ve learned more from just hitting a “.” or a “,” in my IDE than I have from the docs! These things understand the Engine and what is available. I’m sure I’ve saved hundreds of hours by using an IDE.

It would be great if anyone can recommend a good JS IDE (I get asked from time to time). I’m on a PC most of the time, so I use the free Visual Studio C# Express by Microsoft. I have heard Mac users use MonoDevelop.

EDIT: With VS C# I can change the name of a method used in 30 files and just click a little red line and choose rename and it will change the name everywhere it is used (not search and replace, but an actual reference replace). I can also right click on any variable or function or type and choose “go to definition” and I’ll be taken directly to the file and line where it was defined. Very cool.

Speed isn’t an issue (if you follow the instructions in the Unity docs with JS), C# can do a few things the others Can’t, but you may or may not need these things. When i started from scratch, even knowing JS well and C# not at all, I chose C# because of the more pure OO syntax and to avoid any possible future issues. I’m very happy with this decision. I actually like it a bit better than Python these days (I shock myself to hear me say that too).

The vast majority of docs are in both languages but the C# community and language documentation is bigger (remember UnityScript is not actually JavaScript, so you can’t always get help from the world at large.) I start almost any research with a Google search (this is true even for Unity-specific stuff too, by the way)

“They’re both fine” covers it well, but these are the thoughts that led me to choose C#, and a few that keep me there.

Read his signature and you’ll understand.

Really In Unity there’s no difference they’re pretty much just as fast. Just pick one you’re used to