Ashley's Forum Posts

  • The usual way to do this is an action to load a string of JSON data.

  • Don't put a wait before trying to open a new browser window, or the browser popup blocker might block it. You should only attempt to open new browser windows directly in a user input trigger without any waits.

  • Just thought of another option - if you can make a tiny macOS universal app that just detects if it's Intel or Apple Silicon, and then launches one of two other bundled apps, then you can point Steam at the launcher app and it will launch the right one.

  • I have yet to see a solution in C3 that doesn't slow my high-end PC to a crawl at 200ish instances even with nothing else happening.

    Can you share a project file that demonstrates the performance problem of doing something like this? It would be interesting to profile and experiment with it. Perhaps just using a smaller collision cell size would make it OK.

    A problem with making built-in quadtrees is Construct's collision engine needs to extend over an unlimited area (e.g. still handling activity outside the layout area, or with unbounded scrolling). Collision cells can do that with sparse cells. I'm not sure quadtrees can handle that.

  • There's eval(), but it's generally regarded as unsafe and sometimes security measures block it from working.

    You can also load a new script file with dynamic content. As Construct uses modules, you can dynamic import a custom script like this:

    const scriptContent = `console.log("Hello world!");`;
    const scriptUrl = URL.createObjectURL(new Blob([scriptContent], { type: "text/javascript" }));
    await import(scriptUrl);
    
  • Huh, that's weird. These days I generally just upload to Dropbox and share a link - it seems to be a lot more reliable. There's lots of other things that can go wrong with email attachments, particularly low size limits.

  • It looks like Electron universal is a tool that essentially glues an Intel and an Apple Silicion app together in to one - if you're lucky it might work out of the box on NW.js, or perhaps it can be adapted to work with NW.js.

  • It's cool to see a quadtree implementation working in Construct! One of the reasons we added JavaScript coding is to open up advanced uses like this.

    I've been cooking a bit since I noticed that javascript testOverlap() does not benefit from collision cells.

    FWIW collision cells are not actually applicable to testOverlap(): the point is to eliminate even checking instances, so it is basically a filtering system that efficiently reduces the set of instances that you might call testOverlap() on. So it is not possible to implement collision cells within the testOverlap() method itself, it's something that has to come before it. Your quadtree implementation essentially takes the role of collision cells when checking collisions in event sheets - it's an alternative system of filtering the instances you check collisions for.

  • There isn't always a simple example snippet to show. A realistic example of static conditions might involve hundreds of lines of code for a niche use-case that most people don't even need. It's kind of a complicated escape-hatch for when the usual picking algorithms aren't appropriate. My point is Unity can throw dozens of staff at such things, but it's difficult for us to justify. The other alternative for us is just to not document stuff like that and leave it as unsupported engine internals. Then at least people won't wonder what it means or how to use it, but I'm not sure that's preferable.

    If I download the full Construct manual it currently comes in at around 900 pages. It's a huge body of work, and "just sprinkle some examples all the way through" is probably a major project that would take weeks.

    Being a smaller company I think we have to rely on our community more than huge companies that can just throw loads of staff at something. For example there's no way we can possibly do our own Construct integration for all the third-party services out there - it's year's worth of work. So we have an addon SDK so third-party developers can potentially do it themselves without having to wait for us to get round to it. I think it's a similar situation with documentation - if you want tutorials for specific kinds of games, useful code snippets for specific features, demonstrations of useful approaches and algorithms, then we have a public tutorials system for that too, so the community can share their knowledge rather than relying on our already-stretched team to provide everything. To be clear, that's not an excuse for us to have inadequate documentation - I think we do a good job with the resources we have available - but when it comes to samples, guides, tutorials etc. there's just an endless array of things to be covered, it all takes a great deal of work to do well, and the fact is we're a small team.

  • I'm not sure what more there is to add to that documentation - normal conditions are run once per instance, static conditions are run once only regardless of the number of instances, and that's about it. Normally you don't need them, so you can probably just ignore that they even exist most of the time.

    A billion-dollar company with thousands of staff can probably afford to have hundreds of people working on documentation alone, which is many times more than the entire size of our company dedicated solely to documentation. So while we want to have good documentation, I don't think "why aren't you doing well as Unity" is really a fair point to make. In fact I think it's a sign of how extraordinarily well we've been able to leverage web technology that you can even mention us in the same sentence as them with a straight face.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just checked and Alpha Ramp is there in Construct Animate r366.

  • Try disabling any browser extensions you have installed. They can interfere with and break Construct.

    Otherwise try pressing F12 and check the browser console for a more detailed error message.

  • Shadow Caster will draw over anything below it in Z order. If something still appears over the shadow, make sure it's below the Shadow Caster in Z order.

  • If you need maximum performance at all other costs, choose pure JS then. Surely you can have the performance sensitive parts in pure JS and the general purpose stuff in event sheets or mixed event blocks/JS.