large levels peformance

0 favourites
From the Asset Store
Unlock Levels, Worlds & skin plus add coins by watching ads
  • Hey all

    I am up in arms between construct 2 and game maker studio

    Personally I'd like to use construct 2 because it has a friendlier community and a more user friendly interface and less of a learning curve.

    So my two issues as of now is, gm:s yoyo compiler seems appealing for performance ( only supports windows/android though)

    Construct 2 uses WebKit node, how is that in regards to peformance?

    Also my game concept is a top down shooter with a small amount of AI, but many destructible objects, gm:s states you should have the smallest rooms possible, how does construct 2 handle large maps?

    (32x32 tiles and 10,000x10,000)

    Finally I wish construct 2 had simple LAN support, would make my choice so much easier

    Thanks for the time guys

  • The primary benefit of other software is that you're not at the whims of 3rd party software for exporting support, Construct 2 is absolutely fantastic for making games but yeah the exporting options aren't great and it has a tiny dev team size.

  • serpent, yeah I hear you on this one! C2 was the thing that got me back into making games and it is mostly a joy to use. The problems I have found myself going around in circles on, have all been performance based. So, you end up pulling aspects out of your game and simplifying it to get better performance,(which granted is a part of any dev process). But my frustration has been due to inconsistency between versions of node webkit , with performance going up and down depending on its version and just general freezes/ stutters. I gather this is mainly from Javascript's garabage collection routines.

    So in tandem to working on a couple of C2 games, I have learnt GMS/GML, which has a truly horrible IDE, but has given me excellent and consistent performance. At the moment I am continuing development in C2 but have ported one game over to GMS. This has enabled me to go from a stuttering 720p game to a consistent 60fps 1080p game on the same machine . Granted this is a physics based game and my main test machine is a 5 year old core2 duo Win8 machine. Even on my powerful 6 core desktop machine, a 720p C2 game just still feels a bit jerky in chrome. Not blaming C2, I just feel html5/chrome is just not there yet for high performance arcade games, especially if you want 1080p.

    Ideally I want C2's IDE and event system with GMS native output formats. I don't particularly like GMS at all, or the company, but you can't argue with some of the commercial successes coming out of it these days. And there is consistency to its exports, which is the main thing for me. For the time being I will finish off my C2 game, my GMS game and then decide which direction to take my many other prototypes. Also learning Godot Engine, which is probably the direction I will go long term.

    I will always keep C2 around, at the very least for prototyping, or for a pure web based project.

    Anyway, not trying to denigrate C2, as it is a brilliant and very approachable piece of software, just venting some frustration. I am sure there are many that will disagree with me and refute these claims Hopefully all these issues will be irrelevant in a year's time, and I can eat my words!

  • C2 biggest and strongest points are it's Event Sheet system. So I will explain why GMS seems more stable on performance than C2.

    It's Event Sheet are great to program with. They are super easy to code with. They are a clever way of bridging Visual Programming with Coding. I firmly believe that C2 EventSheet design could and should be a standard for game development. In fact I believe in a few years C2 could end up being the Unity of JS based game development.

    However, the big weakest point of EventSheets are the fact that they are designed as GAMELOOP code rather than Object based code. This is important to note because I worked with GMS and GMS is an Object Orientated game design. Most code you do in GMS is part of an object. I do believe GMS does have LOOP code, but most of your work is done in the object's own code.

    This results that GMS know can package and be more efficient with Object based coding. Where as all EventSheet codes will be in the main game loop. With the us the developers in no way being able to get our ES code into the object there is no way to exclude the size of the main game loop. So even if there is an Event even if you want it unused will still be in the main game loop. So do to this performance is a lot harder to manage in C2 than any other OO design code.

    Now some of us requested that Objects such as an Plugin instance can have there own EventSheet; so that the code won't be added to the gameloop. But the idea was considered not worth it. I suppose the problem leads that small games don't suffer this problem infact it's near impossible. But as the more robust a game get's and more importantly the interconnected features a game may use the speed cost becomes much larger.

    As an example in my Point & Click adventure game The Blue Code. Even though nothing might be happening the CPU cost is always a minimum of 20%. The reason is because TBC has many many small features to achieve what the game manages. Even parts that don't do anything most of the time ended up carrying a cost.

    Is there way around this. yes, but this requires A LOT more diligence in code design than GMS does. This is why there are so many threads happening these days. because as more and more people join the community they are starting to exemplify an underlying problem. C2 is more work to optimize.

    I also agree about the exporter. I think the native language should have been JAVA. Java has fantastic conversion tools to other languages. even if C2 was built for Java to JS it would be better off. But that's purely opinion.


    Just as a sample. I created a capx with nothing but 1000 GROUPS. No events. Just groups. This is not practicle no one is going to have just groups. But this is a sample of what I'm talking about.

    Just groups uses 27.6% on my computer. Doesn't sound like alot. It isn't, but theres no math. it's just a code group.

    As it is I'm not sure how we are going to managed our game The Blue Code without a re-write

  • jayderyu

    Well, I'm no C2 expert, but can't you get around those kinds of problems by using groups to disable/enable code chunks as needed?

    Another thing that I have just implemented in my game is a scheduling system. I've found it really helpful, and in a more complex game I think it would be invaluable. This is basically just a global var that cycles thru X number of steps in an endless loop. Then I can place scheduler=x as the top level condition to an event. This way I always know what parts of my code are going to be running when, even if they are intermittent.

    In contrast, going 'every x seconds' over and over means I never know when a bunch of periodic events are going to align and cause dropped frames. And if I use a proxy for my comparison, I can even change the way things are scheduled depending on the game conditions.

  • Whoops, didn't see your edit til now. I have noticed groups have a non-trivial impact on performance, which has always baffled me...I mean, even a few THOUSAND groups shouldn't have hardly any overhead...or maybe that's just my intuition leading me astray. I always try to clear them out when I don't need them -- ie., I'm just using them for sorting, not logic.


    For giggles, could you upload that 1000 group capx? I could do it myself but...wellll...

  • If empty groups are consuming that much CPU cycles, its a big concern..

  • (Edit: disovered on the next page the groups high CPU usage was because of the debugger.)

    Usage as percent:

    No code


    1000 blank base events


    1 base event, 1000 blank sub events


    1000 groups


    1000 sub groups in a disabled group


    1000 sub groups to an event that does not run


    Weird and a bit disappointing that groups hit the performance like that. I wonder if they can be optimized somehow.


    Regardless, they have a very insignificant performance impact if they are skipped because the parent event does not run. As such, you can optimize like so:

    If unit1.count > 0

    • event tree

    That will skip right over unit1's code and all groups contained therein if no instances of it exist.

  • I have no arguing points about optimization. I thought I said as much. I only mention this is because C2 ES requires more diligence in staying optimized where as OO coding design makes it easier and lends a natural performance where as all GameLoop code bloats against performance.

    I really wouldn't be concerned about the consumption of Groups. There is just no way anyone is going to use enough groups for that kind of impact.

    The only reason I mention any of this. Is because on mobile performance on older devices; 2%+ CPU usage of my computer(AMD 4core) is too much and causes performance loss. To me that's just dumb founding that on my iTouch4g 3% drops my 60fps with 700 graphics objects to 30fps with only 70 objects.

  • Well its going to help me decide on how to code from now on, I will avoid using groups unless absolutely needed and stick with separate event sheets for "groups".

  • Arima

    Hey, thanks for that comparison! Really interesting...what is up with groups? It might be insignificant on desktop in most cases...but on mobile...

    What happens if you have a 1000 inactive groups?


    Why do empty groups use up CPU?

  • 1000 inactive groups is the same as if they're active, about 18-28.

    I did another check - it makes sense that a group would use some CPU, as it's got to check if it's active or not. However, comparing against 1000 events checking if a global var=0:


    It makes we wonder if they can in fact be optimized more - I don't understand much about C2 at the JavaScript level, though.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Actually, scratch that. It seems like it only uses up cpu in debug mode. On export to node webkit, it registers virtually no cpu usage. Same for active and inactive groups.


    If you export to node-webkit or html5 page, does your cpu still lag down w/ 1000 empty groups?

  • Oh, duh - of course the debugger hits the CPU in relation to groups, it's doing tons of performance tracking and such. Yeah, in preview but not in debug mode it's down to 0.2 with 1000 groups.

    jayderyu - try using the cpuutilization expression instead of the debugger.

  • Arima

    good catch. I do find this amusing on the groups

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)