Live data from Hacker News

Matter.js – A 2D rigid body physics engine for the web

brm.io

11–20 of 64 posts

Re: Matter.js – A 2D rigid body physics engine for the web

#15
post #7
post #5

Pros: The samples play well, look fun, and it looks like a great solution to small physics demos in JS. Great job! Cons: Playing with the Stress demos (especially #2) really shows the slowdowns and downsides to using a JS based engine. At 450 boxes (+ 4 bounding walls), it runs at 20fps on my Macbook and thats with a lot of jitter and overlap. Not as fun. Edit: Significantly better w/ WebGL render, @32fps, and with s…

> Cons: Playing with the Stress demos (especially #2) really shows the slowdowns and downsides to using a JS based engine. At 450 boxes (+ 4 bounding walls), it runs at 20fps on my Macbook and thats with a lot of jitter and overlap. Not as fun. Have you tried enabling sleeping? Even most AAA games don't actually have even remotely close to that number of bodies active in a game at once. Sure, the engines can handle i…

This JS physics engine isn't multi-threaded but it does run the physics on a separate thread

http://chandlerprall.github.io/Physijs/

Re: Matter.js – A 2D rigid body physics engine for the web

#16
post #5

Pros: The samples play well, look fun, and it looks like a great solution to small physics demos in JS. Great job! Cons: Playing with the Stress demos (especially #2) really shows the slowdowns and downsides to using a JS based engine. At 450 boxes (+ 4 bounding walls), it runs at 20fps on my Macbook and thats with a lot of jitter and overlap. Not as fun. Edit: Significantly better w/ WebGL render, @32fps, and with s…

Have you seen PixiJS? http://www.pixijs.com/ It's used by PhaserJS, a very promising JS Game Framework

Re: Matter.js – A 2D rigid body physics engine for the web

#18
post #8
post #5

Pros: The samples play well, look fun, and it looks like a great solution to small physics demos in JS. Great job! Cons: Playing with the Stress demos (especially #2) really shows the slowdowns and downsides to using a JS based engine. At 450 boxes (+ 4 bounding walls), it runs at 20fps on my Macbook and thats with a lot of jitter and overlap. Not as fun. Edit: Significantly better w/ WebGL render, @32fps, and with s…

GPU acceleration isn't going to be practical until >WebGL2, when we get access to compute shaders. You can technically do compute now by expressing your data as textures and performing rendering passes over it, but trying to do anything non-trivial that way will quickly lead to madness.

I mean, this is what I'm looking for. Sure it would be madness, but if you have 450 bodies represented by, say, 10 floats each (random number), that comes to about 4500 pixels of values- something a GPU is fine at.
Post reply on HN