Ashley's Forum Posts

  • I looked in to this and it does look like it stopped working. It turned out to be a bug in a new code minifier we're using. It should be fixed in the next beta.

    It is best to report problems directly to the issue tracker though - this is just serendipity and I may well miss problems only mentioned on the forum, or commonly they don't have enough information to investigate.

  • It should be supported then. It's hard to help further without knowing more about the problem - perhaps try clearing your browser cache and try again? Alternatively you could connect the device to a mac via cable and use Safari developer tools to check for any error messages in the console.

  • What version of iOS is the device running? The minimum requirement is iOS 15.4.

    Tried both safari and Firefox apps.

    Unfortunately Firefox on iOS is just a wrapper around Safari, as Apple have banned other browser engines. So there won't be much different if you try a different browser on iOS.

  • It's probably possible with a wrapper extension. Construct's extension SDK can give a wrapper extension the HWND for the main window, and then you can make any Win32 API calls you like to alter it.

  • Construct should save data indefinitely. If it's being lost, it is your browser that is deleting it, not Construct. Check your security and privacy settings, and check if you have any privacy-focused browser extensions that might be interfering. For example if you have some thing that deletes all cookies once a day for privacy/security reasons, that will cause Construct to lose all its saved login/settings/etc information.

  • What I'm highlighting here is that I have noticed a tendency for Pixel art games made with Construct on Poki to load slower for players, to the point of significantly affecting the player bounce rates

    Do you have measurements you can share that prove this? I find this surprising - pixel art games should not have heavy art assets by any stretch, and a good CDN should not have a problem with something like 100 small files - with modern HTTP 2+ those all just go down the same connection efficiently without having lots of per-request overhead. For example the Construct editor is 1000+ separate requests to load the editor - mostly lots of small files - but it's served cached via CloudFlare CDN over HTTP/3. A cold load takes <1 second on my system (with a good connection, but still). So I have to ask, what measurements have to made and what has led to identifying spritesheeting specifically as the cause of it?

    Again, in the use case I am defending, memory usage is NOT the bottleneck.

    I know, but we have to make something that works for all sorts of kinds of projects, not just specific ones. If we add a setting, sometimes people change the setting, forget about it, find their project starts crashing, and then leave us poor reviews or end up contacting customer support. So we also try to avoid features that make it easy to shoot yourself in the foot like that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct should never crash, no matter what you do as a user. If it ever crashes, it's a bug. If you did something wrong it should tell you with an error message and not crash.

  • It's best to discuss such things on the forum - generally closed issues are considered resolved, and we prefer not to have extended discussions on the issue tracker anyway (as it actually makes it harder to fix issue reports).

    The spritesheeting algorithm has been tweaked and refined over the years, and there are a lot of subtleties and complications that probably aren't obvious. That's not to say there aren't further improvements that could be made, but it is a very good example of a part of Construct that may look simple but is actually very complicated.

    For example you may try using an external packing tool to compare it to Construct's output. But if it packs tiled background images on to the same sheet, then it is not possible to use a tiling texture mode. Perhaps it could be done with a custom shader, but when you take in to account mipmaps then you get color bleed issues when downscaling. So Construct exports all tiled background images as separate images with no padding so it can apply the tiling texture mode to those images in the engine, because it has to. If you then compare that to some tool that has packed those images all on to the same sheet, you might think Construct looks needlessly inefficient. But it's impossible for it to do what your external tool has done, because that hasn't taken in to account the necessary texture parameters that the engine will need to apply to different images used in different ways.

    Imagine another 10-20 such cases of various subtleties and complications, not to mention that optimal rectangle packing is NP-hard, and you probably are starting to get in to the ballpark of how complicated this area is.

    Is there any good reason why C3 doesn't pack everything into spritesheets as big as possible?

    In short, the answer is because a bunch of games will then crash due to running out of memory, and that is worse than some projects having a somewhat sub-optimal use of spritesheets. The max spritesheet size setting gives you some control over this, but Construct still avoids using unnecessarily large spritesheets where it's likely to waste a lot of memory, and will prefer to split spritesheets in to smaller chunks.

    If you just fill up spritesheets as much as possible, then it's possible a sprite animation will spill over from one sheet to another. At 4096x4096 every spritesheet takes 64 MB of memory. This spilling then means anything that uses that single sprite animation must use a minimum of 128 MB memory for the two sheets. Repeat that in a large project a few times and you can quite possibly double the memory requirement and hit out-of-memory errors. Cue lots of reports of how Construct wastes loads of memory and that it obviously needs to be improved. Spilling also reduces the efficiency of image compression as it spreads similar image content across two different images. Construct tends to put sprites with a lot of animation frames on their own spritesheets specifically to mitigate those kinds of problems.

    I guess we could have a bunch of settings to micro-manage how spritesheets are generated, but we have always wanted to avoid such complexity in Construct, as it makes it less beginner-friendly and it is hard to explain what all those settings do, other than "try random combinations to see what works best for you". I suppose we could have one extra setting along the lines of "prefer filling up spritesheets", as for pixel art games perhaps that will produce a better result. But for pixel art games, is the situation really that bad? Modern web serving will serve multiple files in parallel over the same connection probably involving a nearby CDN. So whether it is downloading 40 files or 4 shouldn't really be that big a difference.

    Anyway, in short, I just want to highlight that if you think there is one easy way to make everything optimal for all projects, it's really much more complicated.

  • If you run in to a problem please file an issue following the guidelines and we will look in to it.

  • The problem here is what is the return type of runtime.objects[str]? For example suppose you have a Sprite and a Text object in your project. Will runtime.objects[str].getFirstInstance() return a Sprite instance (with animation APIs) or a Text instance (with text APIs)? TypeScript doesn't know, even if you persuade it that using str is valid.

    If there is only a small number of possible objects that may be created, it may be better to just use a series of if statements comparing the string and creating the right kind of object. If it could be anything at all, then your approach using any is probably all you can do, as you are telling TypeScript basically anything could happen there.

  • You should check the caching settings of your local HTTP server - if it says to cache resources for, say, 7 days, then the browser will honour that, and if you change the code then Construct will only get the old cached data even when it tries to retrieve the latest code. Usually a HTTP header like Cache-Control: no-store is the solution, but then you may still need to clear the cache after setting that.

    • Post link icon

    This is why I like decentralization to avoid a self-satisfied dictator like you.

    You are perfectly entitled to disagree with anything I say, but language such as this violates our Forum & Community guidelines, so I'm closing this thread. Please consider this a first warning and if repeated the moderation action will escalate.

  • One thing I've found useful for me working on a large project is keeping all of my global variables in their own event sheet and separating them into sections with comments/titles.

    This sounds like a good idea, but I'd add another suggestion which I think is an under-used approach in Construct: if you need a global variable, but you only use it within a particular group of events, then make it a static local variable instead. Being a local variable means it is only available in that group, so it doesn't clog up the global variables list; being static means it remembers its value permanently like a global variable.

  • I can't tell from that screenshot - if you zipped the containing folder, it's probably wrong, but if you zipped the files shown, then it should be right. Maybe using a third-party zip tool will help if macOS doesn't show zipped folders clearly.

  • That must be an old project, because it was removed from Construct 2 something like 10 years ago. The easiest thing to do is open the project in Construct 2, delete the WebStorage object from the project, save the project, open it in Construct 3, and then add the Local Storage object and add back any events that involved storage.