dop2000's Forum Posts

  • See this demo:

    howtoconstructdemos.com/chess-game

    Note, it's for two human players, it doesn't have an AI.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1StepCloser Whoa, I'm guessing you are starting to push the limits of Construct. That's why you still have lags even after garbage collection. I suspect the number of object types is the main factor.

    Our project is much smaller: about 50MB in size, 10K events, 500 object types.

    Looks like we might have to condition ourselves to "F12 + Click Collect garbage icon", just as we've conditioned ourselves to "Ctrl + S".

    I now keep DevTools constantly open on a second screen, together with C3 Search window.

  • Again, without any WAIT actions, would this be correct, or would "Change SOMETHING ELSE into ONE MORE THING" still take place before the sub-event "Create SOMETHING ELSE" and thus fail?

    I Construct, both SOMETHING and SOMETHING ELSE will be created before the second top-level event. (if there are no waits)

    Yeah, Construct logic is a bit different from other languages, it takes time to get used to it. One of the most important concepts in Construct is picking. Once you understand how it works, it all starts to make sense!

  • If you export to NWjs, you can use NWJS.ArgumentCount and NWJS.ArgumentAt(n) expressions.

  • I was going to suggest using families. I don't think there is a better solution possible.

  • Ashley Every time you tell to file a bug with Google, I'm at a loss, because I really have no idea how to explain this in technical terms to their engineers. "An app I'm using in Chrome starts to lag until I force garbage collection"? They will probably redirect me back to you.

  • Hi Ashley,

    If you recall, there have been several posts about the poor performance of C3 editor in Chrome and Edge. When working with fairly large projects, there are random lags and freezes lasting from a fraction of a second to 10-20 seconds.

    What's weird is that these issues are isolated not just to the browser app, but to a single browser tab. I can have two or three editors open in Chrome and only one of them will be freezing and the other two tabs will be working perfectly fine.

    Seems like we found the possible cause of the issue - garbage collection!

    Clicking the "Collect garbage" icon in DevTools immediately reduces or completely removes the lags. Please see the videos in previous comments. Here is also a report from relixes on Discord:

    Unfortunately, the effect is temporary. In my case the lagging returns after 5-15 minutes, so I have to keep the DevTools open and click that button many times a day.

    Can you please do something about this? Perhaps there is some "garbage collection aggressiveness" setting which should be increased, or maybe you could force it to run every 1 minute or so.

  • SnipG I don't use timelines. And I tried closing all tabs in the project, restarting the editor and only working in one or two event sheets - it still starts lagging randomly. So it doesn't look like the number of open UI windows/tabs is what's causing these freezes.

    The good news is that garbage collection definitely helps! Here it reduces 2-3 seconds lag to zero:

    Subscribe to Construct videos now
  • In C3 events are executed from top to bottom. Their order on the event sheet and the way they are nested is pretty important! It determines the order in which the actions are run, and the scope of picked instances.

    See this screenshot with my comments in it. The red numbers show the order in which the actions will run.

  • Yeah, it is not possible to improve performance with filters. You need to find out why your layout lags and try to fix that issue.

  • If Time = 6 when I press and keep holding space, will this action be run at Time = 8 or will it run at Time = 14?

    I think it will run at time=8, so in 2 seconds.

    That's why I don't like this method, I suggest using Timer behavior. On Space pressed start a repeating timer, on Space released stop it.

  • 1StepCloser The lag feels a bit shorter, am I right? Do you have lags in the expression editor? They are the worst in my case, after I type something like "lerp(" the browser can freeze for 10-20 seconds sometimes. And clicking the garbage collection icon reduces them to nothing! Can you test with those?

  • Have Player Spawn Parts and set the animation name to match every image point name.

    You can do the other way around - spawn parts with every animation and attach them to image point with the same name as the animation.

    I don't think it's possible to get image point name by its index.

    And of course you can spawn an entire creature with all body parts using hierarchies and templates.

  • If you have image points with names like "Point1", "Point2", "Point3", then you can access them using expressions like these:

    Sprite.ImagePointX("Point" & number)

    or

    Sprite.ImagePointX("Point" & loopindex("Parts"))

  • There is an official example in C3, have you seen it?