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.

Dark Physics & Dark A.I. & Dark Dynamix / Bowling anyone? DP at work.

Author
Message
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 6th Mar 2007 14:51 Edited at: 18th Mar 2007 22:52
**UPDATED:If you are in the first 8 responses to this thread then** **you downloaded the old vers. This is the new one with a couple** **of bug fixes and instructions added. **


Here is a little bowling game I put togethter. It is not perfect, but close enough for me.
This is not a easy game and it is hard to throw a strike, just like real bowling.
Make sure you read these instructions as there are none in the game.

Instructions:

You need to press the space or mouse button 4 times.

Press 1:
Use the space key or mouse button to start ball moving left to right and vice versa.
Press 2:
This chooses where on the line you will release the ball. Direction guage appears.
Press 3:
This chooses ball direction. Left of center and ball starts out left. Right of center and ball starts out right. The further off center, the further off center you throw the ball. On center and ball will go straight. Spin guage appears.
Press 4:
This chooses the spin and releases the ball. Left of center and the ball will move left. Right of center and the ball will move right. The further off center, the further the ball will move in that direction. On center, there is no spin and ball goes straight.

Use +(plus) or -(minus)keys to speed up or slow down your guages for different speed computers.

Any questions or comments, feel free to e-mail me at ras6711@yahoo.com.

rasdini


Richard

Attachments

Login to view attachments
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Mar 2007 15:45
Cool, I'll have a play later. I did a bowling game using Newton. I tried to convert to DarkPhysics using an early beta, but it didn't have convex rigid bodies at that time so it got shelved.



JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 6th Mar 2007 16:04 Edited at: 6th Mar 2007 16:09
Hi,
I tested your game, and the idea is good, but I can not do other than give my opinion:

You should improve the user interface, since that way of aiming the ball is not "natural".
It is very easy to aim at the wrong place, and it makes the game sort or a "luck" game. It is not clear (on screen) what the clicks do, if you don't have instructions at hand.
The pin rack animation is nice. With today's graphical resources, you could easily do a less "boxed" gameplay.
The pins response make it look as if they are made from rubber, very bouncy.

With some little improvements, the game could be great.

JD

EDIT: You should try to pack your media to protect it.

May the 3d force B with U
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 6th Mar 2007 16:17
Thanks for the input. You'll find that after playing a little bit that there is method to the madness, and I have become good at seeking strikes, getting spares and leaving splits. No different than the real thing.
As far as the collision, I used rigid body dynamic box to the pin shape. This was the best performance. Any other rigid body I tried including a rigid body mesh of the pin itself produced wild results I could not control. This is unfortunately what leads to the imperfection of the game. Not much unlike real bowling where pins may fall when they shouldn't have and so on. As far as appearance, it equals about 1% of the fun in this game.

I just have fun going for the strike or spare.

Rasdini out!


Richard
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Mar 2007 17:43 Edited at: 6th Mar 2007 17:44
You could use 2 rigid body boxes with a fixed joint at 45 degrees to each other. This would give the pins 8 corners instead of 4 and produce better results. Newton has cylinders which are better for bowling pins. The nearest DP has is pill-shaped bodies, but unfortunately these have round ends.

Maybe a combination of a pill-shaped RB with a box bottom would work?





Attachments

Login to view attachments
JDforce
19
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 6th Mar 2007 21:26
From the experience with 3Impact, and using the multiple object (joined) approach as physics model, using multiple spheres approximates the shape of a bowling pin, with a cube at the bottom.

Go to this page http://www.3impact.com/3Impact_Engine/hulk7123/modeling.htm
and browse to the explanation of collision model for the red car to understand my point. This other engine uses ODE and the collision is great.

You can find a WIP game from mine in the link below, with models and all so you can study it for use with DP:

http://www.3impact.com/3Impact_Engine/forum/index.php?topic=941.0

May the 3d force B with U
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 6th Mar 2007 21:50 Edited at: 6th Mar 2007 21:52
O.K. Let's not get crazy here. I'm not looking too sell it. Also, the pin action looks o.k. to me, wish they did bounce like rubber off the sides like at the bowling alley. What I meant by imperfections, is pins registering as down when they are in fact standing. Pins falling during retraction, stuff like that. My biggest triumph was the scorekeeping, which doubled the program in size as you must go back 2 or 3 frames in the scoring process if there are strikes and spares. It was surely the most brain twisting task I had to accomplish.

If anyone would like the code so they can attempt to clean it up and improve it, e-mail me and we can talk.

Rasdini
ras6711@yahoo.com


Richard
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Mar 2007 22:39
Feel free to compare, this was my scoring code. I broke it down into logical steps, but you are right - it takes some thinking about!





Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 7th Mar 2007 15:44
Wow, my code was much more involeved, I had three arrays to store the 2 or 3 possible values of each frame.Frameval1,frameval2 and frameval3.
Good job keeping it simple. Does it work?


Richard
neilo
18
Years of Service
User Offline
Joined: 15th Feb 2006
Location: Sitting in front of my computer
Posted: 15th Mar 2007 03:26
That scoring code isn't accounting for the 10th frame., where you can have up to three balls (if you strike or spare).
Rasdini
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location:
Posted: 18th Mar 2007 22:46
I fixed that bug.

It works now.

rasdini


Richard

Login to post a reply

Server time is: 2024-03-29 01:02:38
Your offset time is: 2024-03-29 01:02:38