Is C2/C3 good for large 2D desktop games?

Discussion and feedback on Construct 2

Post » Wed May 24, 2017 3:57 pm

@jobel - it's a big game for C2, not necessarily as far as 2d games go.

Basically what I meant was that my laptop has a graphics card and a motherboard video (integrated HD). If I disable the graphics card and use the much less powerful integrated graphics from the motherboard the fps actually improves.
B
43
S
12
G
1
Posts: 545
Reputation: 4,246

Post » Wed May 24, 2017 4:51 pm

ome6a1717 wrote: it's a big game for C2, not necessarily as far as 2d games go.

I guess that's a subjective term. What do you consider a big game for C2?

ome6a1717 wrote:Basically what I meant was that my laptop has a graphics card and a motherboard video (integrated HD). If I disable the graphics card and use the much less powerful integrated graphics from the motherboard the fps actually improves.


does your laptop run other hardware accelerated games well? I would try it out on a various computers if you can to help narrow the issue. if you send me a build I can try to run it on my system (it's a couple years old and very moderate desktop).
B
100
S
33
G
16
Posts: 1,204
Reputation: 16,865

Post » Wed May 24, 2017 6:46 pm

BackendFreak wrote:So to wrap up, in my opinion it is possible to make a big project (not sure about a huge one) in C2 in a way to make it work very well, but it's not an easy task. Definietely not a task for a C2 newbie. It needs experience and deep understanding of how the memory managament works in C2, which conditions are the real triggers and which are fake triggers, what takes the most CPU, how to make workarounds for high CPU intensive parts etc. Without all this knowledge you will probably fail in making a big game in C2 as C2 is simply difficult for such projects.

From the other hand if you pick Unity or any other engine you also need to learn how to use it properly.


Maybe scirra should add such optimization tips to the manual. I always read this sort of stuff when going into a new engine.. Yet in Scirra's case all they have is a blog post that says 'dont worry about code optimization', but according to you we should...

In comparison Unity released last year a few videos on optimization tips, turns out making performant games with the tool is hard. :roll:
One interesting thing was how ppl really shouldn't use RegEx and generally any string operation, and if ppl had to do strings, use strbuilder. Because there was a lot of array copy-pasting going on, etc. Unity has it's quirks.

So, in construct's case I wonder where it stands, I mean browsers and the js machines have a lot of optimizations ppl underestimate or don't know about, so all in all it would be cool if there were coding guidelines for construct, based on real world scenarios/experience.


Ashley wrote:Draw calls is another matter really, and happens on the CPU side. It's probably best to split that topic off to a new thread. We have OpenGL ES 3 equivalent capabilities with WebGL 2 though, so if at any point draw calls prove to be a bottleneck, it's something we can potentially optimise in exactly the same way a native app would adjust their draw calls to be more efficient. Most 3D APIs, WebGL included, are specifically designed to allow as much drawing as possible with the fewest draw calls, to as far as possible eliminate the CPU overhead.


What i understand from this is:
1.Construct is does not have any internal optimization regarding drawcalls.
2.There is so far no interest to do so.

Did I miss read this? I mean shouldn't something like this at least be on the roadmap.

@Ashley Btw thanks for all the replies in the thread, it's not every company that has a lead dev replying to regular users.
B
8
S
2
G
1
Posts: 14
Reputation: 974

Post » Wed May 24, 2017 6:53 pm

Message: Kios can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Also, forgot to point out in the other post.
According to this manual entry https://www.scirra.com/manual/183/memory-usage .
Once a sound is loaded it stays in memory forever. I guess this isn't a bottleneck for most cases, specially with modern smartphones, but is this a good design choice to begin with. Shouldn't users be able to unload stuff as needed?

Edit: To answer my own question -> https://www.scirra.com/construct2/releases/r242
Last edited by Kios on Wed May 24, 2017 11:47 pm, edited 1 time in total.
B
8
S
2
G
1
Posts: 14
Reputation: 974

Post » Wed May 24, 2017 7:03 pm

I think if your image memory exceeds 1 gb, C2 actually has a pop up recommending other software, but below that, if you're not targeting mobile, seems to work great.
B
39
S
20
G
18
Posts: 265
Reputation: 12,983

Post » Wed May 24, 2017 11:49 pm

Kios wrote:Yet in Scirra's case all they have is a blog post that says 'dont worry about code optimization'

Can you please link to this post please?

Kios wrote:Shouldn't users be able to unload stuff as needed?

Unloading sounds is possible starting from r242.

I'm not sure why Ashley did not implement the "Unload by tag" action, but if you really need this one then you can also use my Experimental Audio plugin.
ImageImageImage
B
28
S
16
G
82
Posts: 1,031
Reputation: 45,806

Post » Thu May 25, 2017 12:00 am

BackendFreak wrote:
Kios wrote:Yet in Scirra's case all they have is a blog post that says 'dont worry about code optimization'

Can you please link to this post please?


I meant this: https://www.scirra.com/blog/83/optimisa ... -your-time

And about the audio, yeah i eventually found that, they have to update the manual! :D
Thanks for the plugin link!
B
8
S
2
G
1
Posts: 14
Reputation: 974

Post » Thu May 25, 2017 12:33 am

Kios wrote:And about the audio, yeah i eventually found that, they have to update the manual! :D
Thanks for the plugin link!

Please note that you should use this plugin only if unloading by tag is crucial for your project as all the other unloading actions were ported to the official plugin so it's better to use the official one.


Ah this one. Yeah well I must say that this article was always controversial to me, but we have to note that it has been written 5 years ago so the GPUs (especially on mobiles) were not that good/useful for HTML5 games. I mean WebGL wasn't supported that widely and well as these days. So the article says that most common performance issues are related to the rendering part. Fair enough as for 5 years back.

But CPU usage is also very important and overusing loops etc. will just hurt the CPU, not the GPU. I saw tons of time people abusing everytick condition which also hits the CPU a lot. Well it's really a wide topic and there are tons of things to take care/ways to optimize the code. You can kill the app performance on CPU and GPU level easily, that's the truth.

Anyway my statement is that as a C2 developer (and actually any developer including game engines, web dev and anything you code) you should take care about optimizing your code. But a very important note here is that even though optimization is important, the code architecture and readability is even more important. So the golden goal is to find the balance.
ImageImageImage
B
28
S
16
G
82
Posts: 1,031
Reputation: 45,806

Post » Thu May 25, 2017 4:14 am

BackendFreak wrote:But a very important note here is that even though optimization is important, the code architecture and readability is even more important.

I can vouch for that. After all my time using construct, that is what I have found to be the most important. I can probably safely say that because construct allows fast development, it probably is the reason why I learnt this lesson. You can create stuff pretty quickly in construct, but if your code architecture is bad, if it is unorganized, unreadable- you'll have difficulty scaling your projects as you spend more time on them. It's pretty crazy. Like not seeing the forest for the trees.
B
47
S
22
G
65
Posts: 1,127
Reputation: 38,395

Post » Thu May 25, 2017 4:11 pm

Kios wrote:Maybe scirra should add such optimization tips to the manual.

We've got that. It's been there for years. People still make the same mistakes, not everyone reads the manual.

1.Construct is does not have any internal optimization regarding drawcalls.

Completely, utterly wrong! We have very heavily optimised this part of the engine with a sophisticated batching engine based on years of engine development experience. C2's renderer is even better at batching than our old C++ DirectX 9 engine.
Scirra Founder
B
399
S
236
G
89
Posts: 24,541
Reputation: 195,426

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: JesusJ and 12 guests