gles.js - a lightweight WebGL renderer for Android

Discussion and feedback on Construct 2

Post » Tue Mar 31, 2015 8:17 pm

Not sure how this flappy bird look like cause there is no image of it or whatsoever, but if that kind of games takes up 70% of cpu and runs only at 35 fps then obviously you are doing something wrong here.

Crosswalk adds ~17MB to the game (which is a bit idiotic and wasteful) but it's not that bad! Bare in mind that crosswalk work only with Android 4.0 and higher. And even if some devices support 4.0+ it does not mean they are great for games.

And yeah, I'm bit concerned about current situation with exporters too. It comes and goes with waves. Unfortunately there were more bad times then good times. Looks like when everything works as it should then it lasts for a couple of months and when it breaks it takes twice longer to fix it.
ImageImageImageImage
B
157
S
66
G
42
Posts: 2,603
Reputation: 35,343

Post » Tue Mar 31, 2015 9:51 pm

@shinkan
I'm not doing anything wrong, we tested a flappy bird clone already, check this thread please
crosswalk-performance-mega-thread_t125842?start=50
the results was horrible!
i switched to CocoonJS just to save my game on Google Play (OpenSSL issue with crosswalk 7 Alert) and it runs now at 60fps and the APK size is only 11mb
and I'm learning Unity to save my future.
B
15
S
5
Posts: 192
Reputation: 1,514

Post » Tue Mar 31, 2015 9:58 pm

Learning Unity isn't the first threat here, but it is the funniest.
Image ImageImage
B
169
S
50
G
174
Posts: 8,325
Reputation: 110,794

Post » Wed Apr 01, 2015 12:59 am

My game should work perfectly over 6 FPS, but these lag spikes ...
Here's my threat, I am learning Corona SDK.
B
16
S
2
G
1
Posts: 18
Reputation: 1,152

Post » Wed Apr 01, 2015 3:58 am

Just wanted to chime in on a couple of these to put them in perspective; and not so much to refute them.

TGeorgeMihai wrote:Like others said, a simple Crappy Fird clone takes 30MB and uses 20~40% CPU and still has some frame drops... Angry Bots (default demo of Unity) takes 38MB, uses around the same % of CPU, no frame drops.


Unity has a 10mb over at the core. Which is about 7mb less than Crosswalk. Unfortunately there does seem to be some unwanted overheard on the browser aspects. I keep on saying it. But I truly believe Scirra should take Chrome xyz. And customize a version of that. Remove the DOM as a priority.

TGeorgeMihai wrote:Eli0s's Fancy Benchmark runs at 6~9 fps CPU 25~40% in Chrome, 8~9fps CPU 70~90% in FireFox on my Samsung Galaxy S4 while Epic Citadel runs at constant 60fps on default and 30~55fps at Ultra High Quality (rendered at 1080p), and Angry Bots mentioned above...
So yeah, "HTML5 has close to native performance" / sarcasm


Fancy benchmark is nice. But in refer to my comment above. Scirra should just use a stripped verion of Chrome. that would solve a lot of the overhead issues.

Epic Citadel is gorgeous. However please note that 99% of Epic Citadel is
- static environments,
- quadtree collision detection,
- binary spacial tree drawing determination.
in comparison
- C2 poor performances demos are batches of moving objects. Check out Goo Create for a proper 3D static environment comparison
- C2 uses Cell collision detection. however don't let the name fool you. It's still brute force collision detection with in the cells.
- C2 probably uses the Cell's to determine drawing or does brute force.

This all comes down to NOT HTML5 or the browser, but just not well optimized critical performance pipeline of C2 engine. Which I have been requesting overhauls for 3 years now. It's why I requested focus on core malleable World Object with dynamic attached behaviours rather than C2 rigid Plugin system. This would allow for more flexibility to overhaull the choking points in C2.

TGeorgeMihai wrote:Maybe the CPU part is close to native, but the graphics part is not even close. I've stressed my device to test Epic Citadel and Angry Bots at a lower framerate, and guess what, at 15~20fps they still look more fluid, with no stutter then C2 at 45~50fps

I have a Unity game on mobile where the start runs at 15 to 20fps to start on 2 year old devices. Unfortunately that's unoptimized due to time constraints. The game is very flappy birds like. 1 character moving to a tap. Though we 3 more animations on the screen.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,028

Post » Wed Apr 01, 2015 9:49 am

jayderyu wrote:This all comes down to NOT HTML5 or the browser, but just not well optimized critical performance pipeline of C2 engine. Which I have been requesting overhauls for 3 years now. It's why I requested focus on core malleable World Object with dynamic attached behaviours rather than C2 rigid Plugin system. This would allow for more flexibility to overhaull the choking points in C2.

So it is what I feared the most, the engine itself :( . I thought of this since my games can run at 60fps in crosswalk, but there is always a stutter, also the smallest frame drop (even 56~57fps) is noticeable.

I've tested the Unity Demo in HTML5 Preview and while it has 2D and 3D examples, it works surprisingly good, fluid and very good at resources. Couldn't test it on mobile because it takes around 400MB.

And yes, modularity of plugins should be there ... Unity's approach is very good in this way: you include your plugin/asset in your project and after that you use/modify it. Other people don't need to have the same plugins as you or certain versions added to C2 since the plugin is included in the project.

I've already got back my money that I've invested in C2, but not sure about the time ... It feels like C2 is still in beta after more than 1 year I'm working with it. I'm not sad or mad, but doubtful of what to do next.

Ashley has seen that C2 has reached it's limits already and decided to go for C3 (which is a good thing to make a better Construct from scratch than patching the current one) so I could continue working in Construct hoping C3 would make things good, but at the same tame I could go for another engine that can do things good now, but I'll have to start all over again...
B
49
S
15
G
6
Posts: 534
Reputation: 7,195

Post » Wed Apr 01, 2015 3:43 pm

why don't we.. developers and computer scientists (i'm pretty sure i'm not the only one with wide knowledge of AI/CG, c# and JS here) take a look into runtime files of our
behaviours, try to pimp them for bigger performance, update ashley on changes, and let him include those changes in next version of C2 ?

i've already thrown a couple of looks inside A* pathfinding and saw some stuff that could be fastened..

@Ashley #fixC2plsomg<3
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Wed Apr 01, 2015 5:10 pm

I just want to say that as a guy who has made a giant game using C2, I love it and I'm terrified to use it at the same time. I can see in our game where things hitch up. A lot of it looks like behaviors and webGL effects not being as optimized as they could be. Even with the new prototype I'm working on that is still at a very clean and basic stage I'm catching things that I thought were fixed long ago in the engine.

The hitches in our game are so varied between hardware that I am not confident enough to publish another PC game using C2. While I'm having a fantastic time on all of my machines with the game aside of a 7 year old pc. Someone who has a newer pc than mine (I have a new i7 republic of gamers laptop 16gb ram and a 2gb 860m gpu) complains that the frame rate isn't smooth on my game or it crashes or the sound randomly cuts out... I honestly don't know what to tell them. We've done so much trouble shooting and suggesting but so much of this stuff shouldn't be happening. The same bugs don't always have the same solutions. It sucks.

I have someone play testing my current prototype who has a new machine and the prototype just crashes randomly. We can't pin point it. He said the same thing happens with Insanity's Blade... go figure. The prototype is only using a couple of the main webGL fx and behaviors... nothing added extra added. It's just the engine. And I know I haven't done anything kinky with the engine.

Last time I checked one of the recent builds of C2 completely broke Insanity's Blade so we have separate version of C2 running to do our work on either game. We can't test or export IB. It's just borked. So it's at this point that I get pissed when I've paid for a product and it doesn't work and I get shoved aside when I don't upload all of my copyrighted shit and can't recreate the problem in a tiny file with none of the games assets. To me that is a giant "F#ck you, not thank you for buying my product".

But then I ABSOLUTELY LOVE the fact that I can toss my idea into a prototype at close to the speed I can think it up. I can work at it on the fly and that is just amazing to me. The way C2 is laid out from a designers point of view is brilliant. I just flow through everything I do - when it works!

So it's a real love hate relationship. I want to see it *really* get better. I want what I bought to do what it said it would do before it's abandoned. I don't want excuses from anyone - I paid for something because it said it could do something and that's the bottom line.

It feels like the bad relationship that you know you should walk away from because that person just can't clean up their act. But you just can't do it because you see that little glimmer of hope that they can.

Insanity's Blade wouldn't have happened without CC and C2 and that is a fact. It would have take us much longer back then to do it with an engine like Unity. But in my professional game design job, I already use Unity. And it now does things so much more easier than before. And for me, it's not about how much the engine costs. I don't give a shit. It's how well it works, and what it can do for me.

I will hold on to that little glimmer of hope that C2 will break through and be what I expected of it. That's what I want. I don't want to give up on it. I don't want to make a 3d ultra modern epic game to blow everyone's mind. I want to make a simple 2D platformer with some effects and not have it fuck up. That is all.

So as angry as I am at this product, I want it to succeed. Hell, I made a Broforce demo (with awesome gfx) on a lunch break just to show how amazingly simple it was to toss something incredible together in C2. Amazing things can happen with it.

/end lovehaterant ;)
B
47
S
12
G
7
Posts: 341
Reputation: 7,953

Post » Wed Apr 01, 2015 6:04 pm

i will most definitely when i finish my plugin manager and game go through some behaviours / plugins and try to find some optimizations and suggest them to ashley. we'll see how that goes.

also everything i've ran on my PC works just fluidly - 75FPS on i7 4860HQ, 8gb ram, 980M and samsung SSD, BUT!

(there's always a butt :P) - eli0s gave me his barrage thingy - a bullet spawns explosions. those explosions are made of 10-20 random particles flying in random directions. they spawn smoke particles pinned to themself and parciles that make smoke seem dissapear. each bullet spawns 5x. so i tested that on my laptop.

one bullet = 5 x (15+15x32+15x32) (i'll take the middle value ) = 4875 objects in a 1.5 sec - works ok - 75 fps
two bullets - same
but around 5-7, maybe a bit more, let's say 10 bullets - it gets to massive 48750 objects and it sloooows down massively. down to 20-30fps.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
43
S
14
G
12
Posts: 626
Reputation: 9,450

Post » Wed Apr 01, 2015 6:21 pm

We have worked really hard to optimise our engine, to the extent I'm convinced there aren't any easy optimisations left to make. Render cells was getting to the point of very complicated implementation with benefits only in specific circumstances. I think most complaints are just to do with Chromium's frame scheduling/v-sync, which is actively a work-in-progress as the Chromium GPU team are upgrading a bunch of stuff. But as ever if you find anything particularly slow, send me a .capx and I'll profile it. I really rarely get sent .capx examples of slow things, and last time I got sent one I managed to profile it and make improvements to the engine, but people mostly talk about it which isn't helpful, I need to be sent real-world examples! Also as ever if an update breaks anything or you have any other bug reports please file them following all the guidelines, otherwise there's not much we can do.
Scirra Founder
B
398
S
236
G
88
Posts: 24,428
Reputation: 194,600

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 21 guests