vitron
vitron

Reputation: 11

Can I use DirectX in JScript .NET

I'm a JavaScript developer looking to make a 3D game.

At first I tried C# because it seemed alot simpler then C++, but I've just learnt about JScript .NET, a version of JavaScript that also use's the .NET framework like C#.

What I want to know is, can I use DirectX (or to be more precise, SharpDX) in JScript .NET, and if so, is it better then C# or slower?

Upvotes: 1

Views: 286

Answers (1)

xoofx
xoofx

Reputation: 3762

If I was a Javascript developer, I would develop a 3D app with WebGL in a browser...

But if you are "only" a JScript.NET developer, you can of course use a DirectX managed wrapper like SharpDX (but because of JScript.NEt limitations with generics, I don't think it is well suited). Also the statement "better than C# or slower" is inconsistent. Better is a kind of matter of taste.

Concerning which one is slower, JavaScript is not a statically typed language, so It will be of course slower as the .NET/CLR JIT is not able to optimize as much as It would do it for a C# program. But C# is much more powerful than Javascript when it comes to use the full versatility of .NET (generics, unsafe...etc.)

In your case, I would move to JavaScript browser and WebGL or C# and SharpDX, and woudn't stay with an almost "dead" JScript.NET language/environment.

Upvotes: 2

Related Questions