Page 1 of 1
js game test
Posted: Mon Nov 21, 2011 12:54 pm
by VZdemon
got bored and messed around a little with js. here's the outcome.
if your interested in the source code pm me.
press keys 1,2 for animation
and arrowkeys to move
http://vzforumz.herobo.com/_realtime/
Re: js game test
Posted: Mon Nov 21, 2011 2:59 pm
by hallsofvallhalla
i get a "Event not defined" error in FF
Re: js game test
Posted: Tue Nov 22, 2011 7:51 pm
by Chris
Nicely put together, a few things you might want to dive into though, to start off with maybe a little improvement to this would be to preload the images as they are taking a while to load:
Code: Select all
var images = [ 'image1.jpg', 'images2.jpg', 'image3.jpg' ],
image = new Image();
for( var i in images )
{
image.src = images[i];
}
// now do the event handeling
Another thing you would want to look into is canvas and SVG. Imagine canvas as well... a canvas, and SVG as your paint brush.
http://en.wikipedia.org/wiki/Canvas_element
http://www.w3schools.com/svg/svg_example.asp
Once you get to grips with that check out WebGL.
Re: js game test
Posted: Thu Dec 01, 2011 1:28 pm
by VZdemon
Just Uploaded the multiplayer version(it's in the same link), using free hosting so it's incredebly lagy, but if you wanna test it out for yourself on localhost i will upload it to media fire soon so stay tuned.
btw the canvas and SVG thing looks awesome and very very usefull thanks for showing it to me Chris