Thread: Pool Game
View Single Post
Stage 6: basic scoring and end game
Old
davidghemer
Member
 
Status: Offline
Posts: 38
Join Date: Nov 2011
Default Stage 6: basic scoring and end game - 12-02-2011, 11:53 PM

For this version I've update the rebounding of the one ball so that it follows the same laws as the cue ball. I've also added some basic scoring (counts number of shots) and end game detection.

It generally runs pretty well when the balls are hit at low speed. At high speed it throws a lot of exceptions, so I would recommend only using power 1 or 2 shots.

I doubt that this will scale to a game with 15 balls. There are significant timing issues already with just two balls so with all the balls it just doesn't seem feasible. Another issue relates to decreasing the speed of the balls. Using a variable I can get a gradual decrease. However this doesn't happen when I use an array.

Anyway have a look and have a play and let me know if you see any obvious bugs in the code.
Attached Files
File Type: a2w PoolGame_Stage6.a2w (834.0 KB, 68 views)


For video tutorials on programming in Alice 2.2 check out my YouTube channel

http://www.youtube.com/user/drdave785

Also check out my Programming in Alice blog at

http://programminginalice.com
   
Reply With Quote