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:
  • by Anonymous Coward on Wednesday December 17, 2008 @04:32AM (#26142877)

    A small javascript game to waste time with. []

  • Re:Easier? (Score:4, Interesting)

    by Xest ( 935314 ) on Wednesday December 17, 2008 @04:40AM (#26142921)

    It's because most game developers wont want to pratt about for weeks trying to get the core Javascript stuff done, they'll want to write games.

    The availability of these libraries mean they can do that.

    There's the argument that developers always used to have to write their own driver layer and such in the DOS days and then build a graphics engine on top of that so it's not like game developers didn't used to have this barrier and yet still did well. The problem with that argument is back then, everyone had to do that, nowadays people could just go build something with Flash or just do a non-web game with XNA or something instead.

    The importance of good and easy to use libraries means Javascript has a more level playing field with other technologies that currently attract game developers.

    Messing around developing the underlying APIs, framework and such detracts from the important part of developing games- developing the game itself. The more time that can be spent actually developing games, the more potential there is for the games to be better because more time can be spent on the actual gameplay.

  • Re:Easier? (Score:3, Interesting)

    by Psychotria ( 953670 ) on Wednesday December 17, 2008 @04:51AM (#26142961)
    Well, I agree with most of what you say. However, judging by the quality of several recent games that I presume were written in C++ using frameworks that I assume were also written using C, C++ or (parts) ASM, I can't assert that I believe that the framework being available to JS developers would have improved the situation. The guys doing stuff in c/c++/asm are not doing everything themselves... they use lots of libraries. What makes you think that the same libraries being made available to JS programmers would improve the situation? Wouldn't it make the situation worse?
  • by Nicolas MONNET ( 4727 ) <> on Wednesday December 17, 2008 @05:53AM (#26143223) Journal

    HTML+CSS (current versions) is inadequate for most of what it's used for (user interfaces), as opposed to what it's meant for (documents). Add to the mix the monster that is IE, and you need javascript to make it bearable.

  • Define "ready" (Score:5, Interesting)

    by Kjella ( 173770 ) on Wednesday December 17, 2008 @06:38AM (#26143383) Homepage

    Q: Is JavaScript Ready For Creating Quality Games?

    A: No, but it's happening anyway.

    People build quality games out of the wierdest languages, for example Transport Tycoon Deluxe was built in assembler around 1995. I have no doubt you can write quality games in javascript. I don't think it's the easiest or best way, but it's not really my concern. If they cna make it happen, more power to them.

  • by Jamie's Nightmare ( 1410247 ) on Wednesday December 17, 2008 @08:00AM (#26143749)
    Not exactly breathtaking. Tetris hasn't been cool since the original game boy. Why not interact with an Italian plumber [] instead?
  • Re:Easier? (Score:3, Interesting)

    by Xest ( 935314 ) on Wednesday December 17, 2008 @08:24AM (#26143825)

    I don't think we'll ever eliminate bad games on some specific platform no matter how easy we make it to make games for that platform.

    What we will see is an overall increase in games, and with that an increase in good games. It may be that we only get 1 good game for every 100 crap games, but I don't see that as a problem because people will play the good games and ignore the crap ones- as long as there are more good ones out there than that's what we want. Easy to use libraries allow for that, they allow 100 more crap games to be made, but with it they bring 1 good game and again, that's what we want- more good games.

    We've seen this happen before with mobile phone games, with flash games and to an extent we're seeing it now with XBox 360 community games and to a point we're seeing it with the Wii, where many games make use of the new control scheme but most are crap, however it's made worth it by the few that are good.

    The problem is if you don't have an easy to use platform for creating games in the first place you wont even get most the crap games, let alone the good ones.

    There are exceptions to every rule certainly, someone will always go that extra mile and slug their arse off to make a game on an obscure gaming platform (I'd argue Tribal Trouble did this somewhat with the Java platform) but that in itself will lead to creation of easy to use libraries. Some of Popcap's games and games like Fantastic Contraption (There's always going to be bad developers and bad games, this will always be a problem.

    Easier to use libraries wont even increase the amount of good games in relation to the amount of bad games.

    What it will do though is open the door for a few good developers/innovators that will produce good stuff. I'm not so fussed about quantity, like you I want quality, but they go hand in hand with this sort of thing to an extent, that to have any quality titles you need some amount of quantity, that is, for every 100 crap titles, you might find 1 good one, but it's that 1 good one I'll bother with and the others that I'll ignore. If we only have a 1 in 100 chance of a Javascript game being good and we only have 20 Javascript games out there then there isn't the greatest of chances that any of them will be any good.

    I've noticed the same with XNA community games on the XBox 360, there is so much crap on there, but amongst it all there are a couple of gems and to me, they make it all worthwhile.

    We can't ever expect every game for a specific technology to be good, no matter what we do this will never happen, but we certainly can start opening up more platforms to game developers and over time things will improve. We've seen this happen before with Flash games and Mobile phone games, we're seeing it happen now with XNA community games on the 360. For all the flash crap there is out there, we eventually end up with excellent games like Fantastic contraption ( are a testament to the good games that can exist once the tools are available (although in Popcap's case, they made a lot of the tools).

    I've recently even seen some games made on the likes of XNA by people who weren't previously programmers, this in no way means they're incapable of making a good game, some of their ideas are great and the ease of XNA (or even other engines, such as Torque Game Builder) have allowed them to realise those ideas. It's the ease of use of the tools that made these, previously non-programmers, produce better games than the guy who can write a full blown engine + game on top of raw Javascript.

    In a way, I'm not even sure that production of massive amount of crap is even a bad thing, after all most this crap is produced by teens experimenting with the tools and these teens maybe your John Carmack's of tommorrow, making sure the tools are available again in this case is surely only a good thing.

    I think the fundamental point I'm getting at is this- bad games, released free don't actually hurt anyone, there's no downside to having lots of bad games out there, but there are upsides- such as allowing people to learn to make better games.

  • by h4rm0ny ( 722443 ) on Wednesday December 17, 2008 @08:41AM (#26143869) Journal

    But SVG *is* XML-based and can be manipulated as a DOM. We're really 2/3rds of the way there in terms of manipulating it with Javascript. And if we get that, all we have to do is prise streaming video away from FLASH, and we're from FLASH at last!
  • by dreemernj ( 859414 ) on Wednesday December 17, 2008 @10:05AM (#26144505) Homepage Journal
    Widespread use of the video tag probably won't become too common until there is a specific codec or group of codecs that are specified to go with it.

    The tag spec just says it'll load a video, but doesn't specify what kind of video. Safari does quicktime and installed codecs. Firefox and Opera I believe do OGG Vorbis/Theora. If IE added it I would guess they'd do WMV.

    The video tag is not done yet. So its not going to get much use.
  • by aliquis ( 678370 ) <> on Wednesday December 17, 2008 @11:11AM (#26145349) Homepage

    I assumed all of them would support whatever codecs you had installed? If Firefox and Opera don't that suck.

    I see no problem with using mixed video codecs for the videos as long as every browser support the codecs you have installed. My Quicktime can probably play most stuff anyway, and obviously my VLC/mplayer classic would to if I had ran Windows, or mplayer in BSD or whatever.

  • by Anonymous Coward on Wednesday December 17, 2008 @11:46AM (#26145903)

    Haven'tt you heard of jsMSX []?

    Emulators in JS are pretty intense.

  • Re:breakout (Score:3, Interesting)

    by AKAImBatman ( 238306 ) * <> on Wednesday December 17, 2008 @12:06PM (#26146285) Homepage Journal

    Like this []? Breakout is a fairly simple game that requires only minimal animation. That makes it relatively easy to program. That doesn't mean it can't be done better. The breakout example I linked to it pretty choppy once you slow it down to a reasonable speed.

    I wrote a DHTML version of Pong a while back that is far superior. Here's a link. [] The underlying architecture was very primitive when I wrote it, not having features like the Canvas tag available. And yet it is one of the better Pong variations on the net. (If you don't mind my saying so.) The reason for its superiority is simple: 95% of people who write a game don't understand what makes games interesting.

    In the case of Pong, nearly all variations are too slow and the AI consists of stupidly following the ball. Well, that's not very fun. The ball should bounce fairly quickly and the AI should respond like a human. How do you make AI respond like a human, though? Simple: It should not act robotic and it should make mistakes.

    The AI for Pong stops moving the paddle when the ball is traveling in the opposite direction. This helps remove the "robot" feel of the opponent. Next, the computer is limited to the same rate of movement as the player. This gives the player a chance to sneak one by the computer. (Since the ball is faster than the paddle.) Finally, the AI has a bit of jitter in its algorithm. Rather than moving with the ball, it computes where the ball is expected to be. A random amount of jitter is then added to the computation so that the computer has the possibility of "misjudging" where the ball will actually arrive. By adjusting the jitter, the game can be made to play on easy, normal, or hard. (Use the options menu to set the difficulty. Though for some reason, the menu doesn't work on Chrome. So just be aware of that issue.)

    Another game that is rarely done right is Tetris. Take the Jetris game in the "GameJS" link. It's a nice tech demo, but it's a sub-par game. And not because the game is of the "classic" Tetris variety. (My own Tetris game [] was of the same variety.) It at least gets the coloring right in that each piece is a specific color. (Though adhering to the Tetris standards [] for coloring would have been an improvement.) That's a good first step. The bigger issue is that the piece selection does not have a very good distribution of pieces. I regularly get three or four of the same piece in a row. That should never happen in a good Tetris game. Programmers need to take steps to ensure that the player will never get more than two of the same piece in a row. The Tetris "Bag" algorithm [] is a good solution to this that makes the game more fun. Another good trick is to ensure that pieces always arrive in the default rotation.

    Anyway, the point of my rant is that the technology is rarely the problem. A good game programmer can make a fun game out of nearly any technology. An inexperienced game programmer with no understanding of what is "fun" can make any technology look like the problem.

  • Re:breakout (Score:3, Interesting)

    by Annymouse Cowherd ( 1037080 ) on Wednesday December 17, 2008 @05:36PM (#26151213) Homepage

    Another great one is DHTML Lemmings []

  • by dreemernj ( 859414 ) on Thursday December 18, 2008 @01:34PM (#26161969) Homepage Journal
    We already have what you are describing. MOV, AVI, MPG, WMV, they can all be embedded in all the major browsers right now.

    One of the reasons flash is so popular amongst the folks embedding video in sites is that its become a platform for video thats extremely common on the web. It has a standard format.

    Until the video tag spec has a viable video format to go with it, its meaningless. It just means we would use a video tag instead of embed/object/whatever to add the video to the site.

    If FireFox and Opera choose OGG (Vorbis/Theora) and don't use other formats, I believe they'll have made the right choice. Until there is a standard, its just more of the sort of stuff we've been using for years.
  • by tepples ( 727027 ) <{tepples} {at} {}> on Friday December 19, 2008 @11:27AM (#26172961) Homepage Journal

    There is little work in making Javascript be to SVG what Action Script is to FLASH.

    There's still a lot of work. The SWF player is installed on PCs before people buy them, unlike the SVG player. SWF supports audio; SVG does not, and no web browser that I'm aware of supports SMIL.

I owe the public nothing. -- J.P. Morgan