JimJamJammin
05-04-2003, 07:19 AM
I'm developing a Javascript snooker table (which is coming along quite nicely).
However, the current system of choosing the direction to hit the white ball is quite meagre. Currently, a target appears close to the white ball, which depends on the position of the mouse. The target indicates what side the white ball is hit from.
Although this is OK, it is hard to line up the shot very well. I was wondering if there was any possible way of drawing a 'line' from the white ball in the direction that it will travel if hit. I was thinking that one way would be to create an image with just a diagonal line, and resizing that appropriately. However, the method is unpractical because the line would not be of constant thickness. Any ideas?
You look at the table at www.tiffinmaths.co.uk/backgrounds/snooker
Hold down the mouse button to charge up the power of the ball and release to hit the ball. Be warned, its under heavy construction (I only started it yesterday!) so the distribution of momentum currently sucks, balls get 'stuck' together and the balls won't yet go in the pockets.
Any suggestions, help or comments welcome.
Jamie "likes-pointless-abstract-tasks" Frost
However, the current system of choosing the direction to hit the white ball is quite meagre. Currently, a target appears close to the white ball, which depends on the position of the mouse. The target indicates what side the white ball is hit from.
Although this is OK, it is hard to line up the shot very well. I was wondering if there was any possible way of drawing a 'line' from the white ball in the direction that it will travel if hit. I was thinking that one way would be to create an image with just a diagonal line, and resizing that appropriately. However, the method is unpractical because the line would not be of constant thickness. Any ideas?
You look at the table at www.tiffinmaths.co.uk/backgrounds/snooker
Hold down the mouse button to charge up the power of the ball and release to hit the ball. Be warned, its under heavy construction (I only started it yesterday!) so the distribution of momentum currently sucks, balls get 'stuck' together and the balls won't yet go in the pockets.
Any suggestions, help or comments welcome.
Jamie "likes-pointless-abstract-tasks" Frost