Activate your free membership today | Log-in

Tuesday, July 8th, 2008

Spacius - Nintendo meets JavaScript - again!

Category: Games

Fellow Yahoo Matt Hackett took a leaf out of Jacob Seidelin’s book and started converting old school arcade games to JavaScript. Instead of using Canvas his only “non JavaScript” solution is playing the music with Scott Schiller’s Sound Manager (which, as we know, uses Flash under the hood).

You can come down with 8 bit shoot-em-up fever by clicking the screenshot.

Spacius by Matt Hackett

Matt also shows you what the score is and give some more game info on his blog.

Posted by Chris Heilmann at 4:41 pm
10 Comments

+++--
3.6 rating from 23 votes

Friday, June 6th, 2008

Canvas Quest: Rogue like RPG game

Category: Fun, Games

Canvas Quest

Andrew Wooldridge created CanvasQuest with the idea of creating a simple roguelike game. It has some interesting features like map loading, and uses graphics to render the text via sprites.

Posted by Dion Almaer at 3:14 am
5 Comments

+++--
3 rating from 13 votes

Friday, May 30th, 2008

BeSlimed: Mootools Gaming

Category: Games, MooTools

Beslimed

Markus Inger wanted to hone his Mootools skills, so he created a BeJewelled-like game, BeSlimed. Give it a Friday whirl!

Posted by Dion Almaer at 7:23 am
4 Comments

++++-
4.6 rating from 28 votes

Friday, May 23rd, 2008

JavaScript Super Mario Kart

Category: Games, JavaScript

Jacob Seidelin keeps on going, and has created a Super Mario Kart prototype:

It uses the canvas element to do most of the rendering and should work in both FF2, FF3, Opera(9.27 and beta) and Safari 3.1.1. There are a few glitches in Safari in the kart sprites, but other than that it should be playable. Also, if you’re using WebKit nightly builds, make sure you’re using the latest, as some of the recent ones had some canvas problems. I haven’t even considered getting IE support, sorry.

The (minified) code weighs in at about 11 Kb, but unlike the Mario game from last month, this one uses several external image files. This was more a test of how smooth I could get a game like this to feel, anyway, so filesize wasn’t an issue. I think it runs pretty ok, though.

There are a couple of rendering settings you can play with. “Quality” controls how many vertical lines are rendered, “Screen scale” controls the size of the screen (duh). Both trade visual appearance for performance.

Give it a ride.

Posted by Dion Almaer at 6:55 am
3 Comments

++++-
4.4 rating from 37 votes

Friday, May 16th, 2008

Cubescape: Isometric Pixel Fun

Category: Games, JavaScript, jQuery

Ever wanted to create your own isometric pixel picture, but didn’t know what the word isometric meant? Well, now you can fulfil your wildest dreams with Cubescape!

That is the headline for Cubescape, a site that released a new jQuery based front end that lets you drop the cubes!

Perfect for a Friday, go ahead and get dropping on this very clean interface.

Cubescape

Posted by Dion Almaer at 8:37 am
20 Comments

++++-
4 rating from 41 votes

Monday, May 12th, 2008

Live Chess with Comet

Category: Comet, Games

Piotr Dachtera took his 64pola.pl, and created a scalable version using Comet. Dylan reports it as “a Jetty-powered Comet app that uses dojox.cometd on the client-side. It’s a solid implementation that shows chess moves in real-time, and to date is the best all-around Comet game I’ve seen that is live to the world.”

Mathieu Nouzareth then commented that Cafe.com, a Flash based gaming platform also uses Jetty and Comet techniques (compared to AMF etc).

Posted by Dion Almaer at 9:44 am
5 Comments

++++-
4.7 rating from 15 votes

Wednesday, May 7th, 2008

Wii Darts: Powering Ajax applications with Wii controllers

Category: Games, Java, Presentation, Showcase

Ben and I gave a presentation at JavaOne on what’s new with Ajax. Since this was JavaOne, we skewed a little more than we normally would to Java topics, and one of them was using the new Java Plugin, that has great new features such as being able to take a running applet out of the web page, and having it continue to live after shutting down the browser. Java is running out of process here, which also helps the “Java crashing the entire browser” problem.

Anyway, back to our demo. For some context, last year at JavaOne had us performing Guitar Hero on stage, so we knew that we had to use a gaming console in some way. This year it had to be the Wii, but instead of using the console, we decided to just use the controllers.

Wouldn’t it be cool to control a Web page using the controllers? We thought so, and we set to it. You can talk to the Wiimotes via Bluetooth, so we needed a stack that would allow us to do just that. Java has a bluetooth stack. We could get an applet to talk to the Java stack. Hmm.

It actually took quite some time to test out the various stacks out there. In the end we went with a native system called Wiiuse that a lot of Wii hackers use. There is a wrapper library called Wiiusej that gave us exactly what we needed.

A quick test later and we had an application that was talking between the remote and the program. It turns out that the main controller sees a series of IR lights that are in the Wii sensor bar, and this allows you to simulate the system with any decent IR source. In the presentation room the big lights that shine on stage were strong enough to act as a sensor bar so we won’t even have to use it. We can just point out to the crowd.

Anyway, back to the application. We then wrote a Java class that acts as a state machine for what the remote is doing. It understands the movements, which buttons are pushed, how fast you are moving the device. With this data we could build a simple darts game. With the state machine Java code, and an Applet wrapper that exposed the information, we were ready to get to the Ajax side of the house.

We painted a darts board onto the screen and then had JavaScript start polling the Applet for information via JSObject (As simple as: document.nameofapplet.pollmethod()). This turned out to be more stable than talking the other way, even though it meant we were polling instead of being entirely event driven. When the JavaScript code polled the applet it would pass back a data structure with the data for the coordinates of the remote, and whether the dart had been fired (button A to fire, button B to reload). We would move the dart image on the screen as you move the remote, and when fired we kicked off an animation to fire the dart at the board.

At first, it was all too simple. You setup the shot and it would get the right area every time. Not a fun game. We then decided to add some simple physics to the Ajax game. We took into account the velocity of the throw (if weak it would fall down) and how straight your shot was. If you wiggle around, the dart will not be accurate.

Anyway, this was a lot of fun, and shows that as much as we mock Java applets, if we forget about using them as fancy blink tags, and instead think of them as more extension points, maybe there is life for them.

The video below shows you a demo of the application, the source code with an explanation, and more details.

Posted by Dion Almaer at 6:08 pm
7 Comments

++++-
4.6 rating from 28 votes

Friday, May 2nd, 2008

XSketch: Pictionary with GWT

Category: Fun, GWT, Games

XSketch

XSketch is “a multiplayer word sketch game. It is programmed in Adobe Flash, Java, Ajax, and GWT. Gameplay is similar to Pictionary where you sketch a picture with the goal of having other players guess your word and vice versa.”

Ryan Dewsbury creator this game, which he adds to his collection of GPokr and KDice.

This one is particularly addicting!

Posted by Dion Almaer at 10:14 am
2 Comments

+++--
3.7 rating from 7 votes

Monday, April 28th, 2008

Java in JavaScript

Category: Games, Java, JavaScript

As John Resig reports, the Japanese Shibuja.JS user group managed to port (at least in parts) the Java Virtual Machine over to JavaScript. The project is called Orto and there is a Japanese PDF explaining the details (I guess) available on John's site.

Using this you can convert Java code into bytecode and embed it in the document.

JAVASCRIPT:
  1.  
  2. "java/lang/Thread 1316742099":function(){var orto333=orto245[0];
  3. var orto336=orto350(orto333);
  4. if(orto336.orto340!=orto310){orto223("java/lang/IllegalThreadStateException",null);
  5. return ;
  6. }
  7.  

One of the examples shown is a pretty cool Tetris game:

Screenshot of Xetris - a Java Tetris in JavaScript

As Orto simulates the multithreaded nature of Java with yields and timeouts this is of course hard-core simulation (read: hack), but the benefit are that you could Java Games on non-JS devices, like the iPhone.

Orto also seems to try to simulate the Java UI conventions, thus making it easy to convert existing applications (to a certain degree as there is no equivalent in HTML for the richness of Java UIs unless you build them yourself as libraries ike Dojo or Quoxdoo did).

More details are available on John Resig's Blog

Posted by Chris Heilmann at 1:26 am
6 Comments

+++--
3.8 rating from 14 votes

Monday, April 21st, 2008

ProtoRPG: Role Playing with Prototype

Category: Games, JavaScript, Prototype, Scriptaculous

Sometimes you want Monday to be a Friday, so we have ProtoRPG, a role playing game written by Pierre Chassaing in JavaScript using Prototype and Script.aculo.us.

Walk around, add to your inventory, and feel like you are playing your first RPG many moons ago, on a Friday.

Proto RPG

Posted by Dion Almaer at 7:32 am
1 Comment

++++-
4.4 rating from 7 votes

Wednesday, April 9th, 2008

Super Mario; 14KB of JavaScript

Category: Canvas, Fun, Games, JavaScript

Jacob Seidelin is doing great work, and for something fun, he build a piece of Super Mario in just 14KB of JavaScript:

Here's an experiment in keepings things small and confined to one Javascript file. There are no external image files or anything, everything is rendered with Javascript using either canvas elements or old fashioned div-making tactics (for IE). The sprites are stored in custom encoded strings in a format that only allows 4 colors for each sprite but in turn only takes up around 40-60 bytes per sprite.

We also have MIDI music embedded as base64-encoded data: URI's. No music for IE, though, and it seems all the other browsers each have different, minor problems with it, but it sort of works.

Posted by Dion Almaer at 12:39 am
15 Comments

+++++
2.6628396070766E+48 rating from 120 votes

Friday, March 21st, 2008

Snake

Category: Fun, Games, JavaScript

Snake

Andreas Kalsch has created a simple version of Snake in JavaScript that eats your feeds instead of food.

The first time I ever played snake was on a BBC Micro. I was small.

Posted by Dion Almaer at 7:55 am
4 Comments

+++--
3.9 rating from 14 votes

Thursday, January 24th, 2008

The Art and Science of JavaScript Games

Category: Articles, Games

James Edwards has written a very detailed tutorial on using dhtml to create a game which is part of his book:

In this chapter, we took the languages of CSS and JavaScript well beyond the tasks for which they were intended?the presentation and basic behavior of HTML documents -- and used them to create an interactive 3D maze.

First, we looked at the basic principles by which triangles can be displayed using only CSS. We then extended that concept to render a perspective view, creating the illusion of three dimensions. Next, we established a convention for specifying floor plan data, and for dynamically translating that data into a perspective view. By adding listeners for user events, we successfully created an interactive maze that can be completely customized and extended. To top things off, we added some usability aids, such as a top-down map, and accessibility aids including keyboard navigation and captions.

While I haven't delved into the details of every method that comprises the game script (there are plenty of comments, so I'll leave that for you to pursue in your own time), I hope this chapter has convinced you to look at JavaScript in a new light. The possibilities really are only limited by your imagination!

Wowser :)

Posted by Dion Almaer at 6:04 am
11 Comments

++++-
4.2 rating from 20 votes

Friday, December 21st, 2007

Wii Opera SDK

Category: Games

Daniel Gump has created a set of wrapper classes to form an SDK for Opera on the Wii which covers different ground compared to the Wii Remote API that we posted about

Classes:

  1. Comm - Allows communication between players online
  2. Drawing - Plot polygons and images to a drawing canvas
  3. ThreeD - 3D matrix math for polygons and hidden surfaces (General)
  4. ThreeD - 3D matrix math for polygons and hidden surfaces (FPS optimized)
  5. Wiimote - Wii Remote input and motion interpretation

Now I can finally build "The Wee Game" that I have been promising myself.

Posted by Dion Almaer at 7:08 am
5 Comments

++++-
4.5 rating from 25 votes

Friday, November 16th, 2007

Silverlight Minesweeper

Category: Games, Microsoft

Game Friday is here, and it was time to showcase a Silverlight one. This time we have a Silverlight 1.1 version of Minesweeper, with full source code to check out.

Where is Silver Scrabulous?

Posted by Dion Almaer at 2:12 am
10 Comments

++---
2.2 rating from 38 votes

Friday, November 9th, 2007

Protoscripty Same Game

Category: Games, Prototype, Scriptaculous

Gary Haran wanted to see how well the latest versions of Prototype and Script.aculo.us worked, so he created a game, Same Name.

The 179 lines of JavaScript has fun with animations and sound.

Same Game

Posted by Dion Almaer at 4:50 pm
Comment here

++++-
4.1 rating from 36 votes

Next Page »