To some this may be old news, but a while back I was just playing around a bit with javascript and canvas. I built closeline, a simple two player game which is surprisingly addicting (I think I’ve spent at least 24 hours of my life playing closeline, and probably about that much time developing it in various languages as a test of sorts).
I was also hacking together a version of bomberman. I’ve recently picked up work on it again. It’s progressing very nicely.
Latest technology preview here: canvas bomberman!
Pretty much everything works except for enemies, upgrades, the ‘end game’ (finding the exit) and dieing.
NB: Tested on Firefox 1.5, Safari 2.0, and Deer Park (Firefox2). Deer Park doesn’t do anything at all, the other two work fine. Opera9 should run this as well. IE users: Tough. Use a real browser!
{ 7 } Comments
Impressive! Even with nice sprites
Sprites are shamelessly ripped from spritesets and screenshots from the original.
I haven’t found any bad guy sprites yet though so that’s a bit of problem. I do have sprites of the poor fellow exploding.
Interesting facet: It appears that the bomb explosions ‘alpha’ themselves out of existence. They don’t; that’s just an image that looks that way. I tried doing actual alpha, using
context.globalAlpha, but this slows the entire game down to an absolute crawl. Yet checking all squares and rapidly drawing hundreds of images a second is no problem whatsoever.Have Boaz make some sprites, that’s actually something he CAN do
Next step would of course be to write some kind of Comet approach with long lived connections to make it multiplayer. That would totally rock.
I’ll see if boaz wants to make some sprites, it’s a good idea. As far as the comet approach, that’s a whole ‘nother ballpark. But certainly a very interesting ballpark.
I’ll consider it. I first want to dive into web frameworks, I still haven’t found the one I truely like. PHP isn’t it, but it’ll do for something like tipjar. This comet stuff, I don’t think it’ll scale without something like RESTlet.
Or if you want to rack up the real super-sexy nerd points you could use Twisted to scale the server.
… yes, because whinging on about some specific framework is ‘real super-sexy’. I know some Software Technology students that might be able to give you a few pointers on this.
Speaking of ‘sexy’, how would you go about sending data asynchronously FROM browser TO server. The other way around is easy (comet). browser to server? I’m not sure. XmlHttpRequest works in chunks which is probably too slow for sending through every movement made in bomberman.