Click here to Skip to main content
15,881,600 members
Articles / Web Development / CSS

Tom's Halls - A JavaScript Platform Game Engine

Rate me:
Please Sign up or sign in to vote.
4.91/5 (12 votes)
8 Apr 2010CPOL8 min read 79K   671   41  
A 2D platform game engine using JavaScript DOM manipulation and CSS
// Tom's Halls game
// Tom W Hall 2007 - 2008
// tomshalls@gmail.com

// The Landing

updateScreenName('The Landing');

addElement(null, 'wallpaper', 0, 0, 736, 528);

addElement(null, 'ceiling', 0, 0, 64, 16);
addElement(null, 'ceiling', 208, 0, 512, 16);

addElement(null, 'tile-green', 0, 512, 64, 16);
addElement(null, 'tile-green', 208, 512, 528, 16);

addElement(null, 'tile-grey', 0, 192, 256, 16);

addElement(null, 'tile-green', 720, 0, 16, 512);

addSteps(64, 528, 64, 64, 16, 'bricks', false);
		
addSteps(64, 0, 128, 128, 16, 'tile-green', false);
addSteps(256, 192, 256, 256, 16, 'tile-green', false);

addHorizontalMonster(null, 200, 128, 32, 64, 180, 430, forceRight, 2, 'devil-left', 'devil-right');

gLoopInterval = setInterval('loop()', gLoopIntervalMs);

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
New Zealand New Zealand
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions