Hey guys I made a game of pool using ruby and gosu.
The code is a mess right now since I didn't bother cleaning it up, but it should run just fine.
The code itself contains only two classes; Window and Ball.
- WASD to move the camera (can be useful since you can't move the mouse cursor out of the window while releasing)
- Hold and drag the left mouse button to release/fire the cue ball
- The whole thing took about 10 days to make
- My father helped me out with some of the more complex vector calculations + he gave me ideas for improvements every now and then.
- The balls collide using something called "Elastic Collision" https://en.wikipedia.org/wiki/Elastic_collision