Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Topic started by: combatking0 on January 29, 2013

Title: Old JavaScript Code
Post by: combatking0 on January 29, 2013
Many, many years ago (6 or 7?) I created some games in JavaScript, and I've been looking back at them for code examples.

Most of the resources on my old "After School Programmers" site are out dated, but there are a couple of challenging games on there for IE only. If I get time I'll update them for all browsers.

The games are on http://asp2.barcodebattler.co.uk/MyGames/index.php and are accessable from a drop down menu with "Pie Rats of the Caribbean" as the default option. The best ones are Mole Mash and Lone Invader.
Title: Re: Old JavaScript Code
Post by: combatking0 on January 29, 2013
I have developed a newer version of my JavaScript event handler code which should run under IE, FireFox and Chrome.

There may be problems under older versions of FireFox, so please test this out and let me know if it works in FireFox, and which version of FireFox you have tested it with.

To test this, please download and extract the files, then run the web page in FireFox and press your arrow keys. The red square should move accordingly.

I have tested it on FF 15, so hopefully it should run well for all later versions at least.

(edit) The attachment has been superceded.
Title: Re: Old JavaScript Code
Post by: Kirl on January 29, 2013
Works fine on Chrome and FF 16.0.2. :)

Lone Invader and Mole Mash were great btw, got 515 points in mole mash.
Title: Re: Old JavaScript Code
Post by: Yaloopy on January 30, 2013
I've been playing Pie Rats all night!
Title: Re: Old JavaScript Code
Post by: benny! on January 30, 2013
Wow ... great set of javascript games.
Title: Re: Old JavaScript Code
Post by: combatking0 on January 30, 2013
Thanks guys - this was before the Canvas was widely supported, so the programming is quite crude, but they work as games.

I've been testing my template under FF 17 and it works, so I'm confident that it should be fine for newer versions (I've turned automatic updates off for FF).

(edit) I have added mouse tracking in the form of four green lines which follow the mouse. I have tested it in IE9, Chrome and FF 15, 17 and 18, and it seems to work for all of them.

Time for me to update the old games and make some interactive demos.
Title: Re: Old JavaScript Code
Post by: Hotshot on February 05, 2013
Well Done Javascript and some interesting games that you have :)
Title: Re: Old JavaScript Code
Post by: combatking0 on February 08, 2013
Thanks Hotshot,

I've almost got the code updated for Firefox and Chrome.