Nape/box2d + html5 = 100% hdd?


#1

I’m running a box2d sample as html5 release build and see the “system” process occupies 100% of my hdd with ~500 mb/s read/write speed (ssd).

Looks ridiculous. Any ideas?

upd: I’m using Chrome

upd2: I’m using nape.util.ShapeDebug to draw shapes and lines. I cut it out and problem has gone. What’s the problem?


#2

I never used Nape with OpenFL myself, but a big ‘no no’ in HTML5 that I’ve found so far is drawing vector shapes. I’d go one step further and deduce your sample runs well on flash and maybe neko (and also suggest you to do your debugging using those targets instead).
My understanding in this subject is quite limited though… I’d guess it’s a WebGL / Canvas thing but only more advanced users can confirm that.
Let’s see if @singmajesty shows up here with some words of wisdom!


#3

Nape.shapeDebug has aways been really heavy, it’s meant for debug only, not sure why there is a 500mb/s process on hdd though.


#4

In my current game I was using vectors “graphics.moveTo() -> lineTo()” and I was getting exponentially increasing memory usage in HTML5 but not flash or neko. Thus, I did some crazy sprite rotation and scaling hacks to simulate line drawing instead.


#5

In short, don’t use ShapeDebug with HTML5 target