The Daily Click ::. Forums ::. Klik Coding Help ::. Pool in TGF
 


 

Posted By Message
This thread has been locked by an administrator

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
16th April, 2005 at 13:30:21 -

Does anybody know how i can make a billiards engine in TGF? The balls have to go in the right direction and riccochet off eachother realisticly like in real pool.

I also wouldn't mind knowing how i can make it so the player can choose how much power they use: [Like pulling the cue back with the mouse, and the computer knowing how much power the player is using and at what angle they are hitting the ball.]

 
Image
http://www.kevinhaag.ca

Destroyer (CrobaSoft)



Registered
  10/10/2004
Points
  1106
16th April, 2005 at 14:11:02 -

get the Advanced Math Object. and then read some articles about 360 degrees movments, because using ballmovment for the balls doesnt work at all. to make the ball bounce of each other, make the ball's look away from each other when they collide. for the power you just add to a counter when the mouse is hold, then when you release, set the white balls speed to the counter. pulling the cue back would be

always
---> set cue x to x of white ball + cos (angle between mouse and white ball) * speed counter
---> set cue y to y of white ball + sin (angle between mouse and white ball) * speed counter

then it would be pulled away, when you add to the speed counter.
but i dont think it would be worth the trouble, you will need least 4 alterble values (one for x, one for y, one for angle, and one for speed) and TGF only have 3

 
Visit www.crobasoft.com or you're a Noob.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
16th April, 2005 at 14:59:56 -

yes, but then it's hard to simulate putting english on the ball.

 
Craps, I'm an old man!

KevinHaag



Registered
  28/01/2005
Points
  266

VIP Member
16th April, 2005 at 15:06:35 -

destroyer: do u think that u could make an example of what u mean for tgf?


 
Image
http://www.kevinhaag.ca

Destroyer (CrobaSoft)



Registered
  10/10/2004
Points
  1106
16th April, 2005 at 15:36:14 -

I dont have TGF...

 
Visit www.crobasoft.com or you're a Noob.

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
17th April, 2005 at 05:06:04 -

I would try to help but I'm still trying to figure out Shab's cryptic comment

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
17th April, 2005 at 10:22:25 -

If you're from the UK, he means putting 'spin' on the ball.

 
Image

vortex2



Registered
  27/05/2002
Points
  1406
17th April, 2005 at 12:16:52 -

You could use a 2d vector based movement. http://www.gamedev.net/reference/articles/article1019.asp

 
A bit of insanity with every bite!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
17th April, 2005 at 12:17:12 -

I have no idea why it's called putting english on the ball; maybe it's cause someone assumed the english were too drunk to walk a straight line.

 
Craps, I'm an old man!

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
17th April, 2005 at 13:18:41 -

I'd imagine it comes from Snooker and Billiards which originated in England. Snooker relies on accuracy of shot and cueball placement meaning 99% of the time spin is used on the cueball. I guess the Americans decided to call 'spin' 'English' after its prominent use in English cue-games. Probably.

 
Image

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
17th April, 2005 at 18:12:41 -

Bah, even if I was from english I wouldn't know as I don't play pool.

 
n/a

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
17th April, 2005 at 18:39:59 -

Yes thanks for pointing out my error. I did type it a 7:50am.

 
n/a

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
17th April, 2005 at 20:29:04 -

I was going to argue with that but i CBA

 
n/a

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
17th April, 2005 at 23:28:16 -

It's only a coincidence that they are the first 3 letters, it stands for "Australian broadcasting Corporation" (backwards)

 
n/a

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
18th April, 2005 at 00:21:21 -

couldn't be arsed
I like this game

 
Craps, I'm an old man!

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
18th April, 2005 at 07:08:47 -

Damn, I lost. The Game, that is...

 
n/a

Jake Jilg



Registered
  12/06/2003
Points
  53
19th April, 2005 at 16:44:21 -

and the turn grammy stick actually got it's name because it was a child abuse terinalogy for making the pool table in the basement crooked

 
zeeky boogy doog

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
19th April, 2005 at 17:21:12 -

Administrative Message: This topic has been locked.

 
Craps, I'm an old man!
This thread has been locked by an administrator



 



Advertisement

Worth A Click