Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I code using C# and .Net Framework over a year while learning it.
But i have been always afraid of HTML, because of its speed.
I have read much in the internet and it seems like managed C# has higher performance than HTML5.

Right now i am gonna make real time games in C# WPF, but i wanna switch to HTML5 because it is cross platform (write once run anywhere).
And now it comes to performance, is HTML5 good for that?

Is HTML5 performance a problem?
I heard it is not good for real time apps?
Posted

There is no real performance issue - the only thing I experienced is the loading time of the page at the very first time...(relatively large JavaScript files)...
Read here:https://blog.mozilla.org/blog/2013/03/27/mozilla-is-unlocking-the-power-of-the-web-as-a-platform-for-gaming/[^]
Ans check some games here: http://html5games.com/[^]
 
Share this answer
 
Comments
Ziya1995 13-Jan-15 8:56am    
I think you mean no issue for simple apps, but not for really complex apps.
Kornfeld Eliyahu Peter 13-Jan-15 8:58am    
Definitely not! Some of those games (and others you can find with Google) are the most complex applications one can imagine!
I think you have to look at who is going to be playing your games, the "modal users," as to whether it's performance is slower/slow/regular/fast/faster: the kind of hardware (particularly GPU if your games are graphic intensive, do 3-d rendering, etc.) the user has is may make a lot of difference.

And, if you use a "game-engine" of some kind in C#, the extent to which it takes full advantage of the GPU comes into play.

So, if your game places a huge load on CPU/GPU, your users' "average" hardware may become a limiting factor.

But, it's certainly a whole new "ball-game" for high-performance graphic-rich apps using the HMTL5 stack compared to what was possible in the browser just a few years ago.

Did you see this web-app mentioned on CodeProject recently: [^] ?

That's done with OpenGL and the HMTL/JavaScript stack, and I find that pretty mind-blowing.
 
Share this answer
 
Comments
Ziya1995 12-Jan-15 2:09am    
I wanna choose Javascript because it is cross platform, but i am not sure about its performance and that is why i am confused.
If i choose C# WPF, i am sure there is no performance issue.
HTML (or its 5th version) is just a markup language, and is used to render the objects on the screen only. Of course there is no performance problem for writing the applications in HTML, because on the C# side you're also going to use the XAML markup to build up the UI for the objects. So the performance issue would be raised on the programming language side, such as on one hand there is C# and on the very second hand it is JavaScript.

If you're talking about engines that let you write applications in HTML, CSS and JavaScript, that might let you build game applications for your users too. I have myself never tried Apache framework so I won't try to blame them for being bad. Also, in Windows API, web development languages such as HTML5, CSS and JavaScript are also included so you can write applications in HTML and run them using JavaScript and after compilation they will run as Windows applications on .NET framework.

As far as gaming is concerned, if you're going to create a game, although HTML and JavaScript is capable of creating game platforms for you and you will be able to create games using OpenGL or other JavaScript libraries, that let you create offline games which run in browser, or since I talked about Apache they can run as a software application too, but I would still like to suggest that you stick to C#. Did you try out Unity? Unity is a gaming engine which lets you create games just by giving away an object for your game (player) and by writing the code for what it is going to do. Same code of yours, will be re-used for other platforms too. So that means, using C# you're not just going to stick to .NET framework or Windows OS but other platforms like, mobiles such as Android, iOS and others too. C# is better and you will find a lot of more resources that are going to help you out in C#, but you might find yourself alone for JavaScript. Game programming for offline applications using JavaScript is not being used widely although is going on, or at most it is being used in creating games for browser, still Silverlight and other tools are used for those platforms too.
 
Share this answer
 
Comments
Ziya1995 12-Jan-15 2:02am    
The real question is Javascript vs C# WPF.
As i understand Javascript has no issue for simple games, but when it comes to more complex games it makes problems. It is also slower than C#.
So if i choose C# WPF i can be 100% sure there is no performance issue.
No, i am talking about pure HTML/CSS/JS and pure WPF, not engines.

Now i am confused and don't know what to choose.
Right now the only problem is performance.
Afzaal Ahmad Zeeshan 12-Jan-15 9:22am    
WPF is a framework, used to create softwares using XAML and C#, of course there is a huge difference between C# and JavaScript relating their performances. Using pure languagues and creating your own frameworks to run games won't be a good idea brother. You can make a good use of these frameworks and engines..
Ziya1995 12-Jan-15 10:48am    
> You can make a good use of these frameworks and engines..
I use .Net Framework.
I would choose C# WPF .Net Framework to make games, because it has higher performance than Javascript.

What i like in managed code like C# WPF is that:
Native C++ is high performance, but very hard.
Hybrid Javascript is easy and cross platform, but low performance.
Managed C# WPF .Net Framework is easy, high performance and going to be WORA - Write once, run anywhere like Java.

That is why i would like to choose managed C# WPF .Net Framework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900