Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 internet speed test! ×
PC Games (Games) Games

JavaScript/HTML 5 Gaming? 201

cjcela writes "Lately I've seen some HTML 5/JavaScript games popping up on the web. Most of them lack sound, and are not polished, but little by little this is changing. As an example, check Galactic Plunder. While it is only a single-level proof of concept, it is one of the first arcade non-Flash games that I've found playable. Do you know of other comparable or better pure JavaScript games?"
This discussion has been archived. No new comments can be posted.

JavaScript/HTML 5 Gaming?

Comments Filter:
  • All demos (Score:5, Informative)

    by QuantumG ( 50515 ) * <qg@biodome.org> on Wednesday July 14, 2010 @06:31AM (#32897540) Homepage Journal

    Everything I've seen so far has been "hey look what I can do". It's not the domain of cottage industry game developers, yet.

    Just today I was looking at WebGL [khronos.org] which will allow hardware accelerated 3d in the browser.

    I just hope someone, eventually, figures out that the "full screen" button we have in web video can also be used in web games.

    • by AHuxley ( 892839 )
      Exactly it seems to be a sub set of html thats faster, cleaner, better but its not flash.
      In the rush to open source, less crashing and speed a lot has been dropped.
      We are left with MS or Apple like apologists telling us how good the new parts that work are and that nothing better ever existed.
      Flash is not good, but it does offer functionality that seems to have been totally lost in todays development efforts.
      html is evolving but seems far in the past.
      • Re:All demos (Score:5, Informative)

        by QuantumG ( 50515 ) * <qg@biodome.org> on Wednesday July 14, 2010 @06:42AM (#32897602) Homepage Journal

        I'm sure the complete lack of a decent development environment has something to do with it too.

        • by Mad Merlin ( 837387 ) on Wednesday July 14, 2010 @09:43AM (#32899338) Homepage

          I'm sure the complete lack of a decent development environment has something to do with it too.

          What on earth are you talking about? Vim works with every language.

    • Re:All demos (Score:5, Interesting)

      by SquarePixel ( 1851068 ) on Wednesday July 14, 2010 @06:44AM (#32897624)

      I just hope someone, eventually, figures out that the "full screen" button we have in web video can also be used in web games.

      That is actually one of the most significant problems with HTML5. It provides no way for the video to maximize to full screen and is actually even against such functionality with JavaScript (page could maximize the window automatically and so on).

      Currently the only way is to install a Firefox Addon that adds a context menu item to maximize the video object. But that is only for the video object, works only with Firefox and is in no way user-friendly.

      Everyone here always says sites should start changing to HTML5 video, but when it lacks basic functionality like that I just don't see it happening.

      • Re: (Score:3, Informative)

        by tepples ( 727027 )

        It provides no way for the video to maximize to full screen

        Have you tried pressing F11 in your web browser? Just because it's different from YouTube's control doesn't necessarily make it worse. It works especially with games that resize their canvas upon a browser window resize, and the game's scripting could sniff the browser and tell the user which key is a particular browser's key for full-screen mode.

      • Re:All demos (Score:4, Insightful)

        by Sloppy ( 14984 ) on Wednesday July 14, 2010 @11:03AM (#32900894) Homepage Journal

        That is actually one of the most significant problems with HTML5. It provides no way for the video to maximize to full screen

        Try this in Firefox: Command-shift-F (on Mac OS) or F11 (on Linux). There's your full screen. The video doesn't need any way to do that, because it's right at the user's fingertips ***IF*** they want it, and likewise, the user isn't compelled to live with the programmer's arrogance if the user doesn't want fullscreen. This is a good thing.

        Adding a way for javascript programmers to interfere with the user's window environment in such a way, would weaken HTML5. It might make it ever-so-slightly more convenient for your local intranet app server, but for The Internet, it would be a step toward degrading HTML5 into the realm of Flash and ActiveX. Even if they fuck up and add this "feature" to HTML5, then you're just going to have all the browser authors need to add preference options to enable/disable it, and since no one will have reason to suspect that issuing that API call will actually result in full screenage, no one will use it anyway. This idea is just as useless as the past mistake of adding the calls which allow pop-under windows.

      • That is actually one of the most significant problems with HTML5. It provides no way for the video to maximize to full screen and is actually even against such functionality with JavaScript (page could maximize the window automatically and so on).

        This will be done. See this whatwg thread [whatwg.org], or this one [whatwg.org]. WebKit has a non-standard experimental implementation, and it's likely we'll see progress on standardization and deployment in the next year or so. For now, you can usually view videos full-screen by right-clicking and choosing the fullscreen option, or by opening in a new tab and hitting F11. This is one of six concerns that John Harding of YouTube told the WHATWG [whatwg.org] was important for YouTube to use HTML5 video more, and all the implementers are awar

      • by Minwee ( 522556 )

        That is actually one of the most significant problems with HTML5. It provides no way for the video to maximize to full screen and is actually even against such functionality with JavaScript

        I don't see this as a problem. The last thing I need is for random pages to be able hijack the entire screen without my consent. If I want something to be full screen, I will make it that way myself, and then turn it back off again when I want to.

        If you don't see why this is in your best interest, please start up Inter

    • I just hope someone, eventually, figures out that the "full screen" button we have in web video can also be used in web games.

      For flash at least: just find the direct link to the swf and download/paste it in the address bar, that's what I've always done.

  • by curmi ( 205804 )

    Someone trying to get hits on their games website? :-)

    Anyway, that particular game didn't seem to work well on my machine (Mac OS X) with Safari. The Z button wouldn't shoot, and collision detection didn't seem to work most of the time. So not really a good example of what can be done I would say.

  • Effect Games (Score:2, Informative)

    by xnt14 ( 1656123 )
    There's also another awesome game written in html5: http://www.effectgames.com/effect/games/crystalgalaxy/ [effectgames.com]
    It runs at decent speed in firefox, and its very fast in chromium.
    • Re: (Score:3, Informative)

      by physburn ( 1095481 )
      None of there games are HTML5, says so in the comments.
      • by Minwee ( 522556 )

        None of there games are HTML5

        I think the phrase you were looking for was "None of them there games are HTML5, yay boy."

    • Not only it is not HTML5, but it loads twice. And you have to wait longer for the loading after you click start than the loading before you can click start. What assholes. If I knew how long it would take I would never have listened to this shitty music so long.

      Also play control is poo

  • Does anyone know of a FOSS HTML5 game library that handles cross-browser compatibility for you?
  • by combez ( 1855742 )
    I recreated the classic 8-bit arcade game 'Thrust' (predecessor of Gravitar) in this way: http://joncom.be/experiments/thrust/ [joncom.be]
  • We know that full flash websites are inferior to html websites. If you want to sell dogs online, and you want to hire a webmaster and you want to make the shop a full flash website, if you have luck, the webmaster that you will hire, will tell you to drop that idea and make a html shop instead. You can ignore that advice, drop the webmaster, and get another merce.. webmaster, that will make a website for you, and only for you, completely in flash.

    What make sense for normal websites may make sort of sense fo

  • This game has been up for a while. Sound was disabled due to cross browser (un)support for the new audio tag.

    http://canvas.xieke.com/paddlewar.html [xieke.com]

    Bonus points if you know what game it's from, and a medal if you can beat the CPU with 21-0.

  • What previous commenters have been saying is true; there's relatively little by way of gaming on the Java platform despite its long prolificacy compared to HTML 5. HTML 5 is obviously still emergent; it could be over a decade until all its potential for gaming is realized. I was actually thinking of this the other week...a HTML 5 short RPG game of say, 3-5 hours worth of character-driven plotted content. It'd be novel to say the least and could be with us soon.

    Another thing that's got me wondering is how Fl

    • Another thing that's got me wondering is how Flash-based game sites such as Newgrounds.com are going to adapt if (when?) Flash becomes less relevant for the Internet wholesale.

      They don't have to. People won't stop what they do just because Steve Jobs tells them Flash is slow. As long as there is still a community and a market for web games, they will continue to use the tools which work best.

    • by biovoid ( 785377 )

      Though it is pretty awful in this day and age, almost 30 years after the C64...

      You do know that the C64 has been 100% emulated in Flash [codeazur.com.br] don't you? Let me know when HTML5 can do that and I'll consider switching over from my "inferior" platform.

  • This Lemmings clone dates back to 2004 so it's not HTML 5 but it's pretty good all the same.

    http://www.elizium.nu/scripts/lemmings/ [elizium.nu]

  • Nicely rendered, main ship (was it blender), but well the hell is the fire button, (z who uses z). C64 level games on 2010 computer, except the C64 could scroll smoothly, so could a spectrum, why does a browser have a problem, netscape 3 had layers and a timer event didn't it. Bring back Java applets for this sort of stuff. Oh, and have those enemy waves move a bit. Defender was so much better. Remind me, what was the amiga Defender clone, with the giant skull, now that was a game.

    LD HL,16384 LD C,192 LA

  • Hardly the same, but I always liked these: http://kisrael.com/features/gb.html [kisrael.com]
  • A Buddy of mine did this using HTML 4 and Javascript. In fact, he rewrote Mario Bro's, Monopoly and a few others are proof of concepts.

    http://www.googin.getproxied.com/games/ [getproxied.com]

    This guy's scrolling shooter is of course better, but the tech has been around for a while.

  • Make sure you enable pass through mode, otherwise the javascript keyboard event handler will not receive your keystrokes. It's rather frustrating playing a game where your plane does not move. Would have been amusing if I made it through the level anyway.

  • Cities of Apocalypse (Score:3, Interesting)

    by UPi ( 137083 ) on Wednesday July 14, 2010 @08:00AM (#32898054) Homepage

    I created a HTML5 game using canvas and some other technologies. Naturally it requires a modern browser (meaning, anything but Internet Explorer).

    The game is called Cities of Apocalypse and it is a relatively simple game that is somewhere between turn-based and real-time. You can have a look and try it out at http://citiesofap.game-host.org/ [game-host.org] (please be gentle with my server :)

    I hit a few snags while developing the game, such as Firefox 3.0 not having text rendering for canvas, or Opera having a surprisingly slow javascript engine (don't flame me, route calculations take 5x as long with Opera!). All in all, it was an interesting project that I might get back to someday.

  • Are these games more cross-platform than Flash games? Than Java games? Will they run on the iPhone? iPad? (Not that either platform represents a remotely significant percentage of web users)

    Are Canvas games better than Flash games? Are they better than Java games?

    Is the development environment better than existing Flash/Java development environments?

    Is HTML5/Canvas less CPU intensive?

    I've played with HTML5 and Canvas a few times, and I always come away scratching my head and wondering "why all the fus

    • Answer: (Score:2, Insightful)

      They don't require a browser plugin (like java or flash) to play.

      I agree that it's not that big of a deal if your target audience is using Windows PCs...
      If you want Android and iP*d, and many Linux users to be able to play as well HTML5 + JS is a decent alternative.

      I already use Flash's ActionScript, so why not use the almost identical JavaScript to make the game and target a wider audience?

      1. Flash is made specifically for animation, so it's generally easier to get a game up and running with in than in JS+

  • [Shameless Plug] SVGcave [gringer.org] isn't particularly wonderful, but it does demonstrate a few things that can be done with html5 (SVG, not canvas).

  • I started writing a little space-trader game called iAye [iaye-game.com] in HTML5/JS called for the iPhone back before the dev kit was public. I'll readily admit that my code is quite far from perfect and follows the "write-as-you-go" school of design, but even having said that, it was a royal pain in the tuckus to write this game.

    For one, Canvas (at least on the iPhone) is godawful slow. For another thing, mobile Webkit has a tendency to crash. The client-side DB was particularly suspect, and has a habit of crashing

  • About eight hours ago I noticed Boing Boing has been running a gamedev contest that has attracted several Javascript/Canvas games. They seem to have sound using the "Sound" element that works in Firefox.

    http://www.boingboing.net/arcade/ [boingboing.net]

  • I made a canvas remake of 3D Pong... it's mostly a demo and proof of concept, so it doesn't really satisfy your request, but it's playable and somewhat fun... http://lbarrettanderson.com/ [lbarrettanderson.com]

    • Looks cool, and once started the paddle tracks my mouse, but the ball never bounces back.

      Firefox 3.6 on linux.

      • It is pretty glitchy in certain browsers. Chrome seems to work great. Last time I checked, Opera wouldn't display anything properly. The last time I checked Firefox it worked great as well, but that must have been an older version. I've kind of lost interest in it (made an android app out of it which is much more playable and entertaining).

        • Just tried the android app on my N1 while bored at work. Very nice.

          The javascript version didn't very well for me (Chrome 5.0.375.99, Windows)

          • Thanks

            One of these days I might touch up the web version once HTML5 becomes more standardized. Getting the "ping"s to play was miserable, and still doesn't work in all browsers. Not sure what you're experiencing with Chrome 5 on Windows (that's what I'm on as well), but maybe one day I'll address the issue. It's actually a (relatively) easy game to implement with canvas, at least for being 3D. I'm not aware of any easy way to create 3D objects in it, so everything there is just done with some math

            • Sorry for the useless bug report. The exact problem is that when the ball hit's either the opponent's paddle or yours a message box appears reading "INVALID_STATE_ERR: DOM Exception 11". That's probably not very helpful but whatever. I've never done any serious Javascript programming, just the odd bits here and there to fancy up a website. I'm .NET to pay the bills.

      • Now that I think about it, the issue you're having with it not bouncing back is probably due to the audio it's trying to play. I can probably make it so it doesn't crash, but this does demonstrate one of the annoyances with HTML5... audio and video formats... I wish there would just be one format that worked in every browser. I'm pretty sure I set my game up to have several different options of formats (where it chooses automatically), so simply lacking the options probably isn't what's happening, but I'm s

  • http://sixfoottallrabbit.co.uk/gameoflife/ [sixfoottallrabbit.co.uk] The Game of Life in html5.

  • http://www.marginallyclever.com/samples/ [marginallyclever.com]
    I would gladly write more if I had the freedom to do so.
    I'm trying to figure out this websockets thing so I can start making turn-based games.
  • I wrote these several months ago. http://www.marginallyclever.com/samples/ [marginallyclever.com]
  • I'm a little surprised that nobody has mentioned Freeciv.net [freeciv.net]. It's a freeciv (.org) client that runs on a web server, and communicates with the user's browser using HTML5 elements like canvas.

The means-and-ends moralists, or non-doers, always end up on their ends without any means. -- Saul Alinsky