Photo of Sean McManus with John Lennon graffiti Skip nav Accessibility Search Help Support this site

UK writer, author and freelance journalist Sean McManus

Blog Shop Books Articles Photos Games Links © Contact RSS

www.sean.co.uk

©Sean McManus. All rights reserved.

You are here: Home > Articles > Webmaster resources > Javascript GameLib

Javascript Gamelib:
Javascript games programming library

Scott Porter made a popular library for creating Javascript Games, called the Javascript Gamelib. It provided relatively simple routines for animation, sprites, collision detection and control. It meant games programmers could concentrate on designing games for websites instead of spending time rewriting the basic building blocks.

Unfortunately, Scott's site at www.javascript-games.org has been discontinued. I'm making the Javascript Gamelib available here under the terms of the GNU Library General Public Licence, under which Scott released his work.

Javascript Gamelib version 2.10 (updated)

zip file logo Brent Silby has built upon the official 2.09 version of the Gamelib released by Scott. He says his improvements are:
  • properties for sprites such as jumping, falling, fallspeed, etc.
  • tile handling for backgrounds and platforms. It's basically the same as the sprite module, but (of course) the tiles are not updated on each cycle to save speed. "This is incomplete but I have used it in my games," he says.
  • the old V2.09 gamelib modules have been kept in a separate folder
He's updated the documentation as appropriate. Download Brent's Gamelib.

Helpful book

Book cover: Javascript Programming for the absolute beginner by Andy Harris Javascript Programming for the absolute beginner by Andy Harris is a Javascript tutorial that includes a lot of coverage of the Javascript Gamelib.

It includes a step by step guide to building a simple breakout style game, a plane game, a jigsaw game and a racing game. It's a good way to get to grips with the Gamelib, but beginners to Javascript need to make sure they don't confuse core Javascript features with features only available in the Gamelib.

By default, my book links help you order the book at Amazon.co.uk. You can also order the book from Amazon.com.

Related links

Where next?