Web platform or Java for game development?

Hello,
First sorry for my English language. This is not my base language for my country.
But I want to hear the opinion of in what platform better create games eg. after 1 year’s?
Web(HTML5, JavaScript, WebGL) or in Java platform? what you think which platform more popular eg. after 1 year?

And now today Web platform(HTML5, JavaScript) have successful Game Engine’s(http://www.impactjs.com, http://www.rocketpack.fi, and I think is more :slight_smile: ). Too with JavaScript language can programming in Server-Side with Node.js(http://www.nodejs.org) and sure cross-platform(Windows(Microsoft have plans allow developers create programs with HTML5, JavaScript), Linux, Mac, Android, iOS, …).

Too I think more easy development in Web platform for new programmers when Java.

What you think?

It doesn’t really matter, it’s personal preference.

This has nothing to do with technology.
People dont like games because of the language they are written in or what libraries they use or whatever, content is important.
If it works, it’s a good.
HTML5 and WebGL seems more hip. But Applets won’t stop working or JNLPs or whatever.
So I think it doesn’t matter.

Hi!

Microsoft considers WebGL is too harmful to allow its use in Internet Explorer. Therefore, I advise you to give up WebGL if you want to make a cross-platform game.

HTML5 and JavaScript 3D engines are very young. Without WebGL, forget 3D.

So… What can you do? You can use HTML5 Canvas and JavaScript to make a 2D game.

I know there is a real lack of WYSIWYG tools in Java but why not giving it a chance? 3D engines written in Java are generally more mature than JavaScript 3D engines, JMonkeyEngine has a quite big community and a nice GDE (game development environment), Ardor3D is very reliable and professional. Both JogAmp (JOGL, JOCL, JOAL) and LWJGL work fine in applets and with Java Web Start.

Best regards.

P.S: I’m not against WebGL as it will encourage/force ATI, NVIDIA, Intel, etc… to provide better OpenGL drivers which will be a nice thing for all OpenGL programmers whatever the language they use.

I am actually working on my own game IDE/platform at Play My Code; so here is my opinion based on the experience of building that. First I am using HTML5/JavaScript/Canvas for the front-end and PHP for the back-end. I plan to use WebGL in the future, but still only supporting 2D, so I have the canvas as fallback. On the server I plan to switch from PHP to Java; Wordpress and my current hosting are the only things holding this back.

If your aim is to be fully in the browser, then I’d recommend HTML5 + JavaScript. Otherwise Java is a good choice. For the back end I wouldn’t advice JavaScript; it’s not quite mature enough for my liking (but it is certainly getting there). I’d recommend cheap PHP or Ruby hosting for now, and switch to something better in the future.

I’d advise against using WebGL, unless you can fall back onto the canvas (i.e. your building a 2D game). IE 9 doesn’t have WebGL support, but it’s canvas implementation is very fast and easily the best. There are alternatives you can use to get WebGL support, including a Java based one which will work in IE 6. However it’s very common for these fallback technologies to be incomplete or buggy (like Flash canvas implementations, or the WebGL canvas), so I’d advise you don’t use them. That means if you want 3D, either keep it simple (canvas is more then fast enough for a cheap voxel-render or raycaster engine), or use Java.

The main problems I have with Java applets are the startup time, caching bugs, it’s blocked in Chrome, a current issue where applets constantly flicker in Mac OS, and lots of small niggling issues you have to work around. An example of the last one are things like handling the user using an out of date version of Java, because it will simply crash with no error (this affects a HTML game too, but in my opinion it’s easier to work around). I’ve seen plenty of Java games randomly fail to start, or have other bizarre bugs. I have spent most of my programming experience working in Java, which is partly why I have applets fully blocked in my browsers. With HTML/JavaScript you will also have the option of re-using much of your code if you ever target Android or the iPhone; where as you wouldn’t have that option with an Applet. With a HTML solution you will also have better integration between the game and the surrounding web page (for example making the canvas fullscreen and fading out the rest of the page when the game plays, or interacting with forms). You can call JavaScript from a Java applet, and it’s straight forward, but Java-to-JS is not as simple as pure-JS.

You also get cross-browser bugs with both HTML and Java; I find HTML tends to have a lot more, but they are typically minor and easy to fix. With Java it is possible to make an applet which runs at 60fps on Windows 7, crawls at 1fps on XP and Linux, and crashes the entire browser on Mac OS. That said the Canvas is far from stable; I have had to write lots of browser specific code and workarounds in FireFox, Chrome and Safari to solve canvas bugs (IE 9 is the only browser where I have never found an issue). Your game will also be limited to the speed of the slowest browser it will run on (FireFox).

On the flip side Java is very fast, is a much more mature language, has the best tools available I have ever used, scales much better (proper module system through packages, proper multiple file support, and classes are nicer to work with then prototypes), works in IE 6 to 8, and you can use 3D in all browsers.

You also asked about the future; 1 year away I would expect canvas and JavaScript to be significantly faster (especially in FF and Chrome), WebGL to be properly out and supported in all non-IE desktop browsers, Apple to be talking about WebGL on the iPhone (it’s already coming in iOS 5, just not allowed for web content), and for Java to be blocked in more places then it is today (Java is consistently cited as a major security hole). But despite all the negatives I’ve said about Java above, I do believe that it IS the better platform. It is just that it requires LOTS more work. HTML/JavaScript is the easy option, and that is why I recommend it, because ultimately what you build is more important then the technology you used.

That’s just marketing speak for “we’re not supporting OpenGL, use our Direct3D/Silverlight based product”.

I hope you’re right but we cannot be sure of it. I still think staying far away from WebGL until this situation evolves is a more viable solution. vyh can still use OpenGL with Java and switch later to WebGL if MSIE supports it.

I don’t think using OpenGL through Java is any different or more secure than WebGL, both run on a sandbox and code is checked by the VM before being passed to the driver. If there is a way to exploit OpenGL then it’s a matter for either the graphics driver or the browser vendor to sort out and not something that is unfixable.

OpenGL/OpenGL ES is just another layer to the driver like the API’s provided by Silverlight and Flash 11 and can be secured just as easily as them.

Web or Java? Why not use both!