Possibly the next community project
BlitzMax Forums/BlitzMax Programming/Possibly the next community project
| ||
I don't start off community projects unless I feel there is a good reason to, as they usually get completed and everyone benefits. I have seen a surge towards physics engines and the best 2D physics engine just has to be Dynamo. It's free to use and illustrated perfectly with the astounding BreakQuest. So without creating a community project, lets see how much interest there is from you guys first. It is cross platform as it is only C++ code. It is compliant code as well so we'll see if it's worth looking into. Any takers/suggestions and ideas? |
| ||
This is a wonderfull idea, let me look into it more though. If it looks good after further investigation, you can count on my help. |
| ||
ooh this will be nice. |
| ||
I've looked at it a bit more, and it seems that it requires a seperate collision detection system in order to work. SOLID, the system recomended seem to be meant for 3D collisions instead of 2d only. Maybe this would all be a little more than needed for most people. I've posted this idea before, only using a simpler code library. Please check it out and let me know what you think. http://www.blitzbasic.com/Community/posts.php?topic=44391 |
| ||
only what i see is: this engine is under GPL - i think you could never create "commecial" apps with this engine... |
| ||
I think it's under the LGPL, in which case it'd be fine for commerical |
| ||
this engine is under GPL - i think you could never create "commecial" apps with this engine... BreakQuest, as linked in the original post, is very commercial. |
| ||
Would an engine like this be something that could be used to calculate the ball motion in a pool/snooker game? In particular the issues of Back/Top/Side Spin imparted on the cue ball (which I for one am struggling to get my head around). Sybixsus - Glimmer have done a fab pool game in blitz3d - did this utilise some sort of physics engine, or are you guys there just really good at physics? I also notice that cYanide is working on a Physics Lib. Maybe this will cover some of this anyway? |
| ||
Sybixsus - Glimmer have done a fab pool game in blitz3d - did this utilise some sort of physics engine, or are you guys there just really good at physics? You're too kind :) No, Kick Shot Pool doesn't use any physics engine. I checked out Tokamak, Newton and ODE when I began planning KSP, and found that - when it comes to friction and motion transfer - they're all utterly rubbish. Case in point: When you hit the cue ball into another, full ball, the cue ball will ( assuming zero spin is applied ) stop dead and the object ball will take 100% ( or as near as makes no difference ) of the velocity of the cue ball. All of the physics engines get this completely wrong and the cue ball keeps a huge chunk of it's velocity. So I rolled my own. I am not really good at physics, I've love to pretend otherwise, but I'm not. KSP was always intended to be a 2d game with 3d graphics. Jumping the ball was a level of complexity I just didn't want for a game that was going to end up on Reflexive Arcade and BigFish. When you're only working in 2d, it's considerably easier. It's mainly basic trig really. The trickiest part was getting the balls to roll correctly. That was really just a case of tweaking the values and lots and lots of testing until the balls were rolling at exactly ( to my eye ) the same speed as they were moving. Sphere/Sphere collisions and Sphere/Box collisions are really dead simple, and spin, again, was just a case of lots and lots of tweaking and testing. You generally have to do a lot of that even if you use a physics engine. I really can't say if this particular engine would be any better for pool physics or not. I know the three I mentioned were useless for it, and I tried finished pool games made using each of them to verify that it wasn't me. Every pool game I played made with one of those engines was horribly unrealistic. As I said, it's sure not rocket science so one of these engines ought to be able to do it. If not, it's not as hard you might think to roll your own. |
| ||
The trickiest part was getting the balls to roll correctly. That was really just a case of tweaking the values and lots and lots of testing until the balls were rolling at exactly ( to my eye ) the same speed as they were moving. Isn't that the easiest part? 2*radius*pi is the circumference of a ball. For a distance of 2*radius*pi the ball rotates 360 degrees. Calculating the distance the ball rolls per frame, dividing it through (2*radius*pi) and multiplying with 360.0 results in the angle the ball turns per frame around its local x-axis. And putting side on the ball a decreasing percentage of the result above is calculated to turn the ball additionally around its x-axis and y-axis. |