{"id":181,"date":"2007-02-03T23:16:20","date_gmt":"2007-02-04T03:16:20","guid":{"rendered":"http:\/\/www.rakkar.org\/blog\/?p=181"},"modified":"2007-02-03T23:16:20","modified_gmt":"2007-02-04T03:16:20","slug":"integrated-newton-game-dynamics","status":"publish","type":"post","link":"https:\/\/rakkar.org\/blog\/index.php\/2007\/02\/03\/integrated-newton-game-dynamics\/","title":{"rendered":"Integrated Newton Game Dynamics"},"content":{"rendered":"<p>\t\t\t\tI spent the last two days integrating the basics of <a HREF=\"http:\/\/www.newtondynamics.com\/\">Newton Game Dynamics<\/a> physics with my game.  It took about 2 days &#8211; in some ways easier than I thought, but due to lack of forum responses and incorrect documentation I also wasted a lot of time.  Note to others: setting an angular velocity on an object that isn&#8217;t moving is ignored unless you unfreeze it, even though it doesn&#8217;t say this in the manual yet does for other similar function calls.<\/p>\n<p>I got Newton integrated enough to have the fighter fly around and shoot bullets.  My FPS went from 30 to 2 with as few as 10 bullets on the screen.  I actually set all those objects to use non-collidable &#8216;materials&#8217; with respect to each other, (or I think I did, it&#8217;s hard to tell with the poor documentation and closed source) so I don&#8217;t know what the problem is.<\/p>\n<p>I&#8217;m going to debug and profile where the slowdown is coming from.  I really hope the fault isn&#8217;t with Newton, because I&#8217;ve finally learned how to use it and don&#8217;t want to waste another 2 days learning something else.<\/p>\n<p>As an aside, I&#8217;ve found that in general I have a far easier time with open source libraries than closed ones.  For example, I just spent 2 hours trying to track down why my objects weren&#8217;t moving, while they were immediately before I checked in.  It turned out a bad merge set my world size to have the same value for z on both the min and max axis &#8211; so all objects were outside the physics world.  Rather than asserting, or returning false, Newton just silently doesn&#8217;t work.  If I had the code, I could have figured out why in about 10 minutes, as opposed to nearly giving up and changing to PhysX.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I spent the last two days integrating the basics of Newton Game Dynamics physics with my game. It took about 2 days &#8211; in some ways easier than I thought, but due to lack of forum responses and incorrect documentation I also wasted a lot of time. Note to others: setting an angular velocity on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/181"}],"collection":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=181"}],"version-history":[{"count":0,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/posts\/181\/revisions"}],"wp:attachment":[{"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rakkar.org\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}