A few weeks ago Google Maps got me thinking about writing simple games in Javascript. In particular, how much of The Silver Kingdoms could I implement in a browser? If I drop the terrain and make it a 2D overhead game (or possibly isometric, but that might be harder to implement), what I would need from the browser is (a) AJAX support (so the simulation can run on a server and send updates to the browser) and (b) transparent overlays for sprites. There are some nice advantages of writing in a browser. The basic graphics code is already there (image display, animation, positioning, layering) and the basic UI code is already there (mapping clicks to objects, overlapping windows, form controls). The real question is whether it's feasible—can the browser smoothly animate lots of sprites on the screen at once?

A few days later I read that someone had created a Star Wars hack on top of Google Maps. And then I saw someone had created an animated Microsoft campus invasion hack. There's now a wiki page with a list of Google Map hack game ideas.

There are only 9 sprites on the animated invasion hack, but it feels rather choppy. I'm not sure if this is a browser issue, an issue with the demo, or an issue with the Google Maps API. If it's a browser issue then it's unlikely that any nice games are going to be written on top of Google Maps. If it's a Maps issue, then a game using its own map might be feasible.

Some links I've collected while looking for ways to implement a simple game (SimCity-ish) in Javascript:

I hadn't been considering using Google Maps itself, because a SimCityish game where you can't actually modify the city would be boring. I think it might be feasible to build a war or transportation game on top of Google Maps, but the game would need some notion of what the objects on the map are, and that might take some image recognition heuristics. It's unlikely I'll actually implement a real game this way, but I might try a little demo game.

Update [2005-12-16]: Take a look at this game.

Labels:

6 comments:

Anonymous wrote at August 26, 2005 4:23 AM

Maybe you want try my game it's a Nibbles-Clone and use AJAX to show active users and their highscores.

Animation/CollisionDetection is quite simple but it show that is possible.

Every part in the snake is one DIV.

http://www.feichtinger.info/js-wurm
try the beta version:
http://www.feichtinger.info/js-wurm/beta

just type in a name choose a snake speed and click below left on "Neues Spiel"

Anonymous wrote at February 01, 2006 6:20 AM

Hi,

seems like a few ppl are starting to think this way.

I have started on a javascript game engine usng ajax (with a perl backend)
check out a start on a multi-user pokemon (of all things!)
http://www.wolispace.com/josh

I have also progressed a long way with my Creaive Object world (cow) http://www.wolispace.com/cow

This is a multi-user text-based virtual world - this too has an optional ajax interface - again perl backend this time using MySQL for the database not the OS's file system (which I use in the /josh/ game)

All questions, comments coding support welcome.

wm@wolispace.com

Anonymous wrote at February 09, 2006 4:18 AM

I'm also using Javascript/CSS/DHTML/Ajax techniques to build a web game that doesn't feel like a web game - theme of this one is semi-realistic medieval fantasy wargame (set in Harn world from Columbia Games). At this point I have basic UI elements working and A* pathfinding, upcoming items include combat (of course!), order and intelligence propagation delay, supply, and other fun stuff.

Backend is PHP/mysql on Linux (hosted by nearlyfreespeech.net - I love those guys).

Anonymous wrote at August 30, 2008 3:52 PM

Here is something I made (but, its not finished at all). I was working on a javascript gamemotor a few(two??) years ago :s too much to do, to little time. And now I haven't worked at it for some time. If someone would pay me I could surely make some good games using only javascript/html and php /mysql

http://dragon.coolgamez.net/
(use arrows and space to shoot)

Amit wrote at August 31, 2008 12:03 PM

Vidar, it looks cool! I suspect there isn't a lot of money to be made in making games like that, but it can be fun and educational.

Anonymous wrote at November 12, 2008 3:11 AM

Vidar played you're game you're quite good :P
I made a tile based javascript game a little it included shooting but the point whas i wanted it to make it with AJAX and because AJAX response time is about 0.2 seconds i couldn't get the bullets to be seen by every client. and the bullets also where tile based checking you could only shoot in 4 directions.