finscn Posted April 24, 2018 Share Posted April 24, 2018 I know there are some discussions about this topic. But they are outdated & too old. Now it's 2018 , and some physics engines have been updated , and there are some new engines. So , let's talk it again. Which 2D Physics JS Engine is with better performance in 2018 ? matter-js p2.js box2d.js with liquid box2d.ts planck.js or someone else ? Link to comment Share on other sites More sharing options...
GideonSam Posted April 27, 2018 Share Posted April 27, 2018 Matter js for me Link to comment Share on other sites More sharing options...
finscn Posted April 27, 2018 Author Share Posted April 27, 2018 10 hours ago, GideonSam said: Matter js for me There is a test I created: http://fatidol.com/phy-benchmark/ ( NOTICE: There are many different box2d.js projects , I chose https://github.com/flyover/box2d.js (& ts ), Because it includes Google's LiquidFun , I like this feature.) Matter.js is the worst , both performance & correctness onlycape 1 Link to comment Share on other sites More sharing options...
iMplode nZ Posted February 8, 2019 Share Posted February 8, 2019 I agree that box2d.ts worked pretty well, but when I tested it, the ranking was box2d.ts, matter.js, p2.js, and plank.js, which had like 8 frames per second. (I can't deal with constructors though, so box2d.ts is out of the picture.) Thanks for the test though, I was going to choose plank.js. Link to comment Share on other sites More sharing options...
mattstyles Posted February 8, 2019 Share Posted February 8, 2019 I'd take benches with a pinch of salt, I tried this on my newer Macbook and got generally worse FPS than the ones mentioned on the page. For me, both box and p2 had similar fps, 40-50 (box slightly higher), planck was 10-20, matter reported 30-60 (yes, a wide range) but looked about the same as planck, both box and p2 looked super smooth. p2 was the only one that regularly 'glitched' 1-2 boxes into the circles. Perf is only part of the overall pie though, and probably not a huge percentage of it. For anyone starting a new project and needing some physics chops, take a look at the api, sample code, community and run a few of your own tests (as close as possible to what you're building) before jumping to conclusions. Link to comment Share on other sites More sharing options...
totor Posted February 8, 2019 Share Posted February 8, 2019 the problem is more of what kind of computer hardware do you target because results will be very different if your test machine is the average laptop with a crappy proc or a higher end dev machine. Link to comment Share on other sites More sharing options...
Recommended Posts