Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Physics Carrom/pool 2D

Author
Message
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 12th Nov 2020 06:24
is their any example about pool or carrom game . I could not manage the physics situation .. so I want to see some example
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 14th Nov 2020 23:03 Edited at: 14th Nov 2020 23:22
i hope this helps get you started:

not my best work, and i was going to add more like checks to make sure the striker was on the table before shooting, apply rules, etc, but i gotta leave something for you, right?

there's a lot of trial and error when playing with box2d. if i was going to do this seriously, i would pull real-world characteristics into it and scale everything correctly, for starters. IE, board @ 74cm, men @ 3cm, etc. that's what i'd suggest you do. then play with friction, dampening, restitution, etc., and remember, if you're going to manually set Mass, do it after all other manual adjustments.

good luck!

oh, some controls/instructions might be helpful (incase its not obvious in the code):
you can't place the striker while men are moving. there's a check in there to make sure you're not colliding with men when you attempt to place the striker.
once placed, hold the pointer down to increase power and drag to determine angle. release to, well, strike (my first time looking at Carrom so i don't know ALL the terms (yet))
[My Itch.io Home] [Now Playing]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=AGK] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[Google Forum Search]

Attachments

Login to view attachments
TamBam
12
Years of Service
User Offline
Joined: 29th Nov 2011
Location: India
Posted: 16th Nov 2020 06:51
Thanks dear .

Login to post a reply

Server time is: 2024-04-25 17:21:38
Your offset time is: 2024-04-25 17:21:38