Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Is JavaScript Ready For Creating Quality Games? 165

kumpetan writes "After seeing so many games built with JavaScript, and considering the applications it powers and the use of Ajax, it seems like web developers are now in the game development pot. It is getting easier and more popular with libraries like jQuery, MooTools, Prototype, etc. There are even libraries like Game JS, GameQuery or JavaScript GameLib, specifically for this purpose. So, will we start to see more ambitious game projects arise using these tools?"
This discussion has been archived. No new comments can be posted.

Is JavaScript Ready For Creating Quality Games?

Comments Filter:
  • Actionscript (Score:1, Insightful)

    by Anonymous Coward on Wednesday December 17, 2008 @04:06AM (#26142773)

    Since Flash's Actionscript and Javascript are basically identical, almost anything that can be done in one can be done in the other. The real limitation is DOM, which sucks compared to Flash.

  • Easier? (Score:5, Insightful)

    by Psychotria ( 953670 ) on Wednesday December 17, 2008 @04:25AM (#26142859)

    It is getting easier and more popular with libraries like jQuery, MooTools, Prototype, etc

    What does "easiness" (of programming) have to do with the end quality of the game? It could probably be argued that "easiness" (fancy API's etc) actually reduce the quality of games by giving tools to people who do not know how to wield them properly. This is obviously not true for all games; there are simple games that can be adequately programmed in lots of languages. Addictive, puzzle-like, entertaining games. Then there are other games that push the envelope of what is possible. Pushing the envelope does not make a good game though so I digress.

    To cut a long story short I don't think the availability of libraries etc to do the grunt work of games will improves things. In fact, I think it may result in an influx of poorly programmed/poorly thought-out games written by people who know enough to program a web page or move a LOGO turtle. It may of course be great for prototyping.

    Note to QuantumG: Exclude your tetris implementation from the above comments. Nice work.

  • No. (Score:2, Insightful)

    by SharpFang ( 651121 ) on Wednesday December 17, 2008 @04:37AM (#26142909) Homepage Journal

    Matter of performance, not language capabilities.
    Writing games in JS is rather easy, rather pleasant, rather fast. It's a nice language for the programmer, due to very flexible structure (override built-in methods? yay!) and has some great development tools (Firebug), and it's a nice language for the user, because everyone has a web browser, no installation required.

    It's not nice for the machine. First, it's an interpreter. Second, due to this very extreme flexibility it won't ever be very efficient. It's sandboxed, meaning it can't run natively at full speed, every operation must be scrutinized security-wise. The rendering uses non-native extensions that lack in efficiency too. It's event-based meaning you shouldn't run a loop at full speed (or the user gets a requester "this page is running slow, should I stop the script?"), you need to create clock events to trigger each iteration. And you get a HUGE pile of compatibility issues.

    Of course, if you create a faster computer, the Nature will create programmers writing the usual in slower programming languages.

  • Yes. See Flash. (Score:3, Insightful)

    by naz404 ( 1282810 ) on Wednesday December 17, 2008 @04:42AM (#26142925) Homepage

    it seems like web developers are now in the game development pot

    Flash was the realm of web designers/web developers and is now one of the most widespread game development platforms.

    Moreover, Flash's scripting language, Actionscript [] is based on ECMAScript [] which is in turn based on JavaScript [], so Flash game developers have in fact been creating games in Javascript for some time now.

    Flash Actionscript = JavaScript (although Actionscript 3.0 now resembles Java more)

    So yes, Javascript is not just ready, but has in fact been one of the de facto languages for creating quality (fun and addicting!) (Flash) games in the past few years.

  • by RLiegh ( 247921 ) on Wednesday December 17, 2008 @04:43AM (#26142939) Homepage Journal

    I'll be the first to admit that my knowledge of flash-based games is quite limited; but just because java script can do most of what flash can do doesn't mean that it's ready to do quality games.

  • short answer: yes (Score:5, Insightful)

    by El_Muerte_TDS ( 592157 ) on Wednesday December 17, 2008 @05:07AM (#26143037) Homepage

    There is no reason why you can't use JavaScript as the script engine for your game engine. Just like you could use lua or python.

    If the question is if JavaScript + WebBrowser is ready for games? Yes, has been for quite some time. With improving javascript interpreter speed and better webbrowser functionality (i.e. "canvas") element you can even create graphic intensive games. But javascript based sudoku, tetris, sokoban, etc. games have been possible for over 10 years.

  • by oliderid ( 710055 ) on Wednesday December 17, 2008 @05:34AM (#26143151) Journal
    Javascript can't. The biggest problem imho is animation and vectors. You can't really use formats like SVG which is poorly supported by most browsers (if not all). So if you plan a 100% javascript+html+css, you have to stick to bitmap sprites and even there, there are some issues (slow, browser compatibility, etc.).
  • Quality? Games? (Score:5, Insightful)

    by sweet_petunias_full_ ( 1091547 ) on Wednesday December 17, 2008 @05:36AM (#26143165)

    How about we start with some quality... webpages?

    You know, the type that worked reliably with just about any browser, the way it used to in Web 1.0 before web standards became a marketshare battleground?

    Lately, websites have become picky about which browser you use for just this reason. The AJAX monster they're trying to get everyone to use is just too unwieldy and expensive to maintain in terms of programmer time if they actually have to support all of the browser versions. The outstanding bug count is too much even for some of the big players in this space, I dare say.

    I'm sorry, but I'm just not that optimistic that games will be very well supported across browser versions to think that it will result in "quality". Instead I have a sneaky suspicion that someone will try to use some slick game that works on a couple of browsers to pull marketshare over to its cloud, but all the while dictating to people which browser they must waste their time upgrading in order to participate in the hypefest. Then, a few browser versions later, the game won't work anymore.

  • by ChienAndalu ( 1293930 ) on Wednesday December 17, 2008 @05:55AM (#26143229)

    Presses 'down' key on keyboard

    Seeing page scrolling down

    Is JavaScript Ready For Creating Quality Games? NO

  • Re:Quality? Games? (Score:3, Insightful)

    by sakdoctor ( 1087155 ) on Wednesday December 17, 2008 @05:56AM (#26143239) Homepage

    You must have been on different internet tubes from me.
    For me "Web 1.0" was riddled with badly written copy/paste JavaScript, IE only sites, punchable monkeys, doubleclick cookies, dancing hamster gifs and pop-ups that you couldn't block.

    How can the vast progress we've made not make you optimistic?

  • Re:Quality? Games? (Score:2, Insightful)

    by Anonymous Coward on Wednesday December 17, 2008 @05:58AM (#26143251)

    Part of the reason people use libraries like Dojo, Mootools, etc is because they solve a lot of the cross browser woes. I've been developing in dojo for over 2 years now and I rarely have browser compatibility problems, except with older IE which I'm lucky not to support.

    I do think certain goals would be idiotic to even attempt outside of the Canvas element, and if you are working in the DOM, you most likely would like transparent PNG support because most games that aren't text based have some form of image composition going on.

    That said, if you are requiring canvas xor png32, you already have reasonably high requirements on what browsers can be used. You won't be worrying about IE6 flaws.

  • by QuantumG ( 50515 ) * <> on Wednesday December 17, 2008 @09:01AM (#26143963) Homepage Journal

    Because, for some ungodly reason, everyone still uses keyboards that put the cursor keys on the same side as the mouse. Surfing the web is all about the freakin' mouse.. so making a web game that requires you to take your hand off the mouse is a bit silly.

  • by aliquis ( 678370 ) <> on Wednesday December 17, 2008 @09:27AM (#26144115) Homepage

    Safari, Opera and Firefox already have support for embedded videos thru HTML 5. So we're already there.

    All I want for christmas is YouTube, DAP- and game-reviewing sites to start using it instead of flash. Probably won't happen until Microsoft has managed to drag their balls out of their ass and manage to pull IE8 out at the same time (and way ..)

    If only atleast Google had some balls big enough to say "oh well, YouTube requires a decent browser!", or they could just check with JavaScript if the browser is new enough to have HTML5 video support and fall back on Flash if it's not.

  • by Jekler ( 626699 ) on Wednesday December 17, 2008 @10:08AM (#26144541)
    I find it interesting that we're still figuring out how to implement games on a 32/64-bit 2+ gigahertz computer that barely rival games we previously implemented on an 8-bit 2 megahertz platform (NES). I would have imagined that even in a worst case scenario, emulation of an NES system in JavaScript would be trivial just by throwing more processor cycles at it, but the games people are creating in ActionScript and JavaScript are closer to Atari 2600 games than anything else. The games that are more complex tax a modern computer as much as the latest 3D games.
  • by merreborn ( 853723 ) on Wednesday December 17, 2008 @04:43PM (#26150557) Journal

    Even as a huge fan of AJAX web applications and javascript libraries, I don't understand why'd you'd pick javscript over flash for developing anything any more complex than tetris.

    Anything javascript can do, flash can do better and faster. And the number of flash-capable browsers out there is almost as high as the number of javascript-capable browsers. Flash gives you far, far better image handling capabilities, and more.

    Other than the "haha, I did X on a platform that isn't really meant for it" factor, why would any serious game developer choose the javascript-in-a-browser platform?

The intelligence of any discussion diminishes with the square of the number of participants. -- Adam Walinsky