View Full Version : Question on Jscript games and images

09-26-2003, 04:49 AM
Right now I'm working on a javascript snake game (http://www.zuban.tk) and i've found that it runs slowly and chopily on slower computers. Currently im creating a layer for each image using the <div> tag. I think that is ineffeciant and is why the game runs slowly. This is my first Jscript game so I'm unfamiliar with the standerds. I've looked at a few sample game scripts but can't seem to find a way to effeciently do graphics without layers. I'm probably just overlooking something simple.
Thanks for your help

09-26-2003, 05:36 PM
Nothing really constructive to add I'm afraid except that it ran fine on my 2Ghz p4 and that I found it excellently playable - the rotation-steering method adds a whole level of difficulty... :thumbsup:

09-26-2003, 07:10 PM
Yeah, you are just stuck with the speeds....that is why all gaming systems require a certain procesor......

Nice game.

Only thing you might look into is not using images or divs and using a table, but it will look worse then what you have. I would stick with what you got.

09-26-2003, 11:43 PM
Thanks, i just thought that since my graphing calculator can run snake without a problem then surely a p3 should have no problem. It runs fine on my computer but i have a p4 2.4 gHz.

09-27-2003, 01:29 AM
Increase the quantisation of the animation - run half as many iterations but move twice the distance; it may look jerkier, but you'll get better performance.

The balance between iterations and movement is very important - I'd recommend experimenting with a few different ratios on a few different computers, to find the optimal.

Nice game btw - more interesting than the usual snake :)