123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|428|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> SpikeDislike Stress Test

Page : 1 2 Next 3
Prev
Mon, 26 Sep 2022, 03:23
Jayenkai

Three.js Stress Test


Trying to wrangle Three.js to do some nice 2D "spriting".
Have managed to (finally!) get it working how I want things to, and have made a little stress tester..

Test here, if you would, please.. K, thx!

First it'll run at 500 sprites, as the ball bounces, then 1500 as the white spike bounces, and finally 2500 sprites whilst the red spike bounces.
(Assuming they show up at all!!)

FPS shown on the top left. Let me know how it handles on your system.
I'm expecting 1500 (white spike) to be the optimum framerate.

-=-=-
''Load, Next List!''
Mon, 26 Sep 2022, 05:38
AndyH
Tested on my phone, can try laptop later.

30-34 fps for first part, 9-14 fps for the second.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Mon, 26 Sep 2022, 05:41
Jayenkai
Aw, bugger.. That's not good..
Mon, 26 Sep 2022, 07:05
Jayenkai
Test v2 with the obvious final goal being obvious.

Let me know how it scores..
Same rules as before. The first ball bouncing is 300 sprites, the middle spike is 600 sprites, and the red spike is 900.
Except there's now also oversized background bars to fill out the background, too, so ..

Let me know your framerates!!

-=-=-
''Load, Next List!''
Mon, 26 Sep 2022, 07:09
Pakz
On the ipad pro 2021 and iphone 13 all runs at 60fps.

On the ipad 2017 it runs at . 25,15,10
Mon, 26 Sep 2022, 07:15
AndyH
46, 36, 30 ... again only on the phone. It all looks silky smooth until the red spike which looks a bit rough-ish.

Edit... actually it is not too bad. I had to zoom in to see the fps text and that was making it rough. Zoomed out normally they are all smooth, but speed difference is noticeable between the three.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Mon, 26 Sep 2022, 07:20
AndyH
Also, on phone I was testing in portrait. In landscape I get higher fps, about 34fps on the red spike.

Landscape = 54, 42, 34. Perhaps it is faster cause I'm not zoomed in to see the fps in landscape?

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Mon, 26 Sep 2022, 07:39
Jayenkai
Landscape, I imagine might be better, because there's less of the long background bars to draw.
Not 100% sure how webgl/three works with optimising offscreen objects.

-=-=-
''Load, Next List!''
Mon, 26 Sep 2022, 09:02
rockford
60 FPS constant on my lappy.
Mon, 26 Sep 2022, 11:54
steve_ancell
On desktop:
I'm getting 60 fps with the ball, 58 with the white spike and 42 with the red spike.

|edit| I forgot to mention that it very noticeably slows down on the red spike in Chrome, in FireFox it runs smooth on all three. |edit|
Mon, 26 Sep 2022, 13:43
spinal
70-75fps on my desktop in chrome, 120fps on my phone in chrome.

-=-=-
Check out my excellent homepage!
Mon, 26 Sep 2022, 13:45
Jayenkai
120? Damn, I'll have to hunt for a way to limit the framerate..

-=-=-
''Load, Next List!''
Mon, 26 Sep 2022, 15:31
AndyH
Solid 60 on laptop.
Mon, 26 Sep 2022, 18:23
jprofitt
I get a steady 60fps in firefox
Wed, 28 Sep 2022, 02:55
Jayenkai
Last test, I hope..

Instead of using Three.js and its WebGL stuff, I've gone back to Canvas drawing, and optimised my basic framework a little more.
500,1500 and 2500 sprites as before.
Hopefully it "should" run a little smoother on phones and the like..
Let me know!
Ta!

Hopefully the final test
(And apologies that I broke the images for the original test!!)

-=-=-
''Load, Next List!''
Wed, 28 Sep 2022, 03:26
rockford
60 FPS across all three sprite modes, Windows 11 pc running Firefox.
Wed, 28 Sep 2022, 03:44
Jayenkai
Yeah, I think you're in the same boat as I am, as far as being able to test this on lesser devices is concerned
That was one thing I loved about my older "cheapo" laptops. Could always manage to stress those out, no problem!

I'll have to dig out my older Android test things, and see how it runs on those.

-=-=-
''Load, Next List!''
Wed, 28 Sep 2022, 04:42
AndyH
On my phone, that seems much worse. These in landscape which mildly better.

500:40 fps ok smooth, but some judderyness

1500:16-18fps - quite judder in some movements

2500:11fps I wouldn't want to look at that too long, not nice.

I'm sure I'll get solid 60fps on my laptop, which is a decent spec.

But Three.js was much better on my phone. (Assuming the test cases you made are comparable)

Have you looked at p5.js ? I quite like that, never stress tested it though.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Wed, 28 Sep 2022, 04:59
Jayenkai
Tested on my crappy Samsung Galaxy Tab 0.05mhz, and yeah, it's stuttery as all hell on there, too. Barely reaching 20fps.
But it's coping better than the WebGL version that barely reaches 12.

I've added two additional quick tests. 5b disables antialias and 5c disables rotation, neither of which seemed to improve it on the Samsung bag'o'crap.

The smoothness is down to the delta-timing. I'm the older 3-test,, it's slow but every frame is being drawn, so it looks like it's smoother. Whereas the 5 tests are delta timed, so you're seeing the jumps between frames.
You should hopefully be able to see this by trying out 5d which disables the delta timing.

Man, I wish there was a perfect solution for all of this.

-=-=-
''Load, Next List!''
Wed, 28 Sep 2022, 05:03
Jayenkai
... To be fair, I'm very much over stressing the engine here.
It's SpikeDislike, for god's sake, it doesn't need a mega-engine to run it.
I'm drawing literally hundreds of spikes onscreen, when in reality there's.. like.. what, 10 spikes, maximum?
I should just make the bloody game, already.

-=-=-
''Load, Next List!''
Wed, 28 Sep 2022, 06:13
AndyH
3-test on sloelwest is 19fps and everything moves smooth.

5d as slow as previous reports, not smooth at all. One thing I notice is 5d (and the previous) stall every so often for a fraction of a second which is very noticeable. The three one does not

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Wed, 28 Sep 2022, 06:45
Jayenkai
Final test for today... I've a newsletter to write!

Test 5e!
5e drags things back down to 200,400 or 800 sprites, so less of a stress.
Still way more than what the actual game would need, but best to be safe.

I've removed my framerate limiter, and am now 100% reliant on the delta values being accurate.
I'm assuming the framerate limiter was causing that "fraction of a second" glitch.
Doesn't help that 1000ms/60fps isn't a whole number.

This final test uses scaling, rotation and alpha, with Antialiasing for the spike-snake.

-=-=-
''Load, Next List!''
Wed, 28 Sep 2022, 06:53
Jayenkai
*sigh*
Well, that doesn't help..
Firefox just did an update, and now even 200 sprites is chugging along at about 40fps!! What's that about!?!

-=-=-
''Load, Next List!''
Wed, 28 Sep 2022, 07:06
AndyH
Much better.

Best is 60fps and with 800 it's 30. Looks fairly smooth, almost as steady as the three ones, but obviously no slow down.

I suspect there is a fractional issue in the delta as there is a slight hiccup in the smooth moment of the ground and stars at regular intervals. But it's slight.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Wed, 28 Sep 2022, 07:06
Jayenkai
Further testing reveals that Firefox has literally just now flipped how rotated drawing works..

Previously, it was better at drawing anti-aliased rotated objects.
Now it's better at drawing aliased rotated objects.

Like, literally just now.. .. I mean, obviously dependent on when the update got pushed through, but.. yeah, just now!!
Fuxake, how am I meant to do all this!!!?!?

-=-=-
''Load, Next List!''
Thu, 29 Sep 2022, 13:03
Jayenkai
Is it that late? Goodness me, where did the day go?

Let's have another test!

Good, Bad or Ugly?
Let me know!
(Please ignore the fact that the floor and stars are kinda wobbly.. Was testing the Skew function!)

-=-=-
''Load, Next List!''
Page : 1 2 Next 3
Prev