Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / Billiard (pool) game
- - By Makki Date 2016-08-13 21:44 Edited 2021-08-22 21:10
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.

Picture:
https://i.imgur.com/tlKNAh2.png

Controls:
- 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

Notable information:
- 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

Have fun!
Attachment: BilliardbyMakki2017.zip - Billiard (25k)
Parent - - By jlnr (dev) Date 2016-08-14 07:23
The download from mega.nz doesn't work for me, can you please attach the file to your posting? ("attach" link in the post's footer.)
Parent - - By Makki Date 2016-08-14 11:01
okay done! The Mega link works fine on my computer... is it because it's encrypted or something?
Parent - By lol_o2 Date 2016-08-14 14:32
Some browsers don't support Mega.
Parent - By jlnr (dev) Date 2016-08-17 20:17
It's a pity that this is such a low-traffic place, because this little game is great. Really solid work on the controls & fantastic physics without using a physics engine :) Thanks for sharing!
Parent - By shawn42 Date 2016-08-19 15:58
Looks great! I had some problems putting enough power into the shots that were near the edge though.

Also, idea: create a blurred 2 frame animation for the balls and animate them when rolling. You could rotate the sprite based on the direction the ball is rolling. Keep up the good work!
Parent - - By jlnr (dev) Date 2021-07-24 13:43
Billiardv1.0.zip was marked as a virus by my web hoster. I assume it's a false positive, but I won't re-upload it either. I think the best way is to only share source code on here going forward.
Parent - - By Makki Date 2021-08-22 21:24
Understandable. Now the zip only contains the source code of the present version from 2017. I lost the original source code from 2016, but nothing seems to have changed atleast.
Parent - By jlnr (dev) Date 2021-08-23 21:33
Oh hey! Thanks for editing and updating this :)
Up Topic Gosu / Gosu Showcase / Billiard (pool) game

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill