views:

257

answers:

4

I have been following the usage of JavaScript for the past few years, and with the release of extremely fast scripting engines (V8, SquirrelFish Extrene, TraceMonkey, etc.) the possibilities of JavaScript have increased dramatically. However, the usage share of Internet Explorer coupled with it's total lack of support for recent standards makes me want to drop a bomb on Microsoft's HQ, as it creates a huge amount of problems for any website.

The game will need to be pretty dynamic client-side, with animations and other eye-candy things, but not a full-blown game like those that run directly in the OS using DirectX or OpenGL. However, this might be a little stretch for JavaScript and will certainly feel extremely slow in Internet Explorer (given that the current IE engine can be hundreds of times slower than SFX; gotta see what IE9 will bring), would it be better to just do the whole thing in Flash? I know this means requiring the plug-in AND I have no experience whatsoever with Flash (other than browsing YouTube :P). It also means I can't just output directly from PHP, I would have to use XML or some other format to pass data to it (JSON is directly integrated in JS and PHP can deal with it easily).

Another idea would be to provide an alternative interface just for IE, though I don't know how (ActiveX maybe? or with Flash, then why not just provide it to all browsers) or totally not supporting it and requiring the use of other browsers, although this is plain stupid from a business perspective.

So here am I, wondering what approach to take and thus asking for your advice. How should I build the client-side? AJAX in all browsers, Flash in all browsers or a mix (AJAX for "modern" browsers and something else for the "grandpa": IE).

A: 

I think you shouldn't leave Java out of the equation. It's a powerful, fast language, and with Java applets, you can do almost anything. If you want hardware-accelerated graphics via OpenGL, JOGL can do it, even in an applet.

On the other hand, it might not be right for you. But at this early stage, I think you should evaluate all of your options, and since you have no experience with Flash but sound like you've got a bit of programming experience, you might feel more at-home with Java.

Ricket
Thing is I personally totally hate Java and will not ever touch it for a number of reasons (as a programming language). Also it requires the Java runtime, which is anything but small and fast to load.
iconiK
To each their own, I'm not even going to try and convince you otherwise.
Ricket
Also, an objective point: it's like shooting a fly with a bazooka, really big overkill for the needs.
iconiK
+1  A: 

I recommend a plug-in platform (Flash, Silverlight, or Java) over AJAX. Having a clean layer of abstraction between your game and the client's browser is a big advantage. In any non-trivial AJAX game look forward to endless corner-cases where browsers differ in performance or implementation.

Personally, I think Flash is easy to learn if you are coming from AJAX experience. Flash is currently the most widely installed and proven plug-in for browser games. However, Silverlight and Java are both building momentum. Also, the Unity engine has become a popular choice for commercial browser games.

Evan Rogers
With a JS library (jQuery, maybe Dojo) I'm hoping to iron out most of the differences. Except for IE, I don't think there will be any differences with a library.
iconiK
I don't have the experience to know for sure, but JQuery and Dojo have not been heavily use-tested on games so I would not expect them to handle game-related stuff well. If you go that route I suggest gameQuery. http://gamequery.onaluf.org/. The results in the demos are impressive, but this is by far the least proven approach, and as a rule of thumb, that means more problems for you.
Evan Rogers
A: 

I believe the current answer is Flash game.

Alternatives:

Java Applet: getting less and less common those days and it is not commonly installed as a plugin on many computers.

SilverLight: too new and might vary and change in time. not commonly installed on many computers and it's Microsoft (whom tends to change technology every 2 years ...)

JavaScript / AJAX: Still a new kid on the block, it's on the rise it is true with many nice features, but still lack of good cross browser for IE even IE8, can not play sounds internally, still slower than the others, and you don't know where will it evolves.

Eventually probably the best solution for now is Flash development: Cross platform. Works fast. Long time already alive and have a lot of support.

I hope this answer will change in the next year. Happy Peasach.

aviv
The only way you can say Java is getting less and less common, is if you're talking about Microsoft's piece-of-crap Java VM, which is thankfully not installed by default any more. It was to Java what IE is to the browser industry, but probably worse.
Ricket
I think he means it's getting less common because Flash is catching up on all grounds (it's also got a higher install base) and modern browsers can do wonders with JS. Java is BIG, the runtime is BIGGER, but when high-performance portable applications are needed, it beats Flash and Silverlight hands down at this point.
iconiK
A: 

Check out Jmonkey. The "plugin" loads if you have Java on your machine. Once it's cached, the next time the visitor goes to the page, it your game loads very quick. Check out their website for demos and see what I mean: http://www.jmonkeyengine.com/

Oh, I forgot to say, it's a 3D scenegraph Java engine. I just tried it again, and it loaded in linux. Looks they've put in some good work.

Don't do it with javascript in the browser. And Flash really can be a pain just because it's closed source and you don't know if you've made a mistake or found a bug - speaking from experience. I'd never want to make another Flash game again.

sims