Ashley's Recent Forum Activity

  • Shared sheet's might be good in some cases, but what about if one sheet contains a lot of images that are not even used in the current layout.

    An upcoming release groups objects on to spritesheets according to those which are used together on layouts, which is aimed at solving exactly this. However with a couple of projects I tested, it didn't seem to make a big difference to memory usage, which I think indicates it's not a major problem.

    I don't think Kiwi Story is a very good example, because it's pretty tiny in terms of memory usage - only around 20mb or so. This is small enough that it's probably better to group as much as possible on to the fewest number of spritesheets, to get the maximum performance. It's only really important for scalability, when you have games which use hundreds of megabytes of image memory.

  • Updated the original post with new download links based on NW.js 0.35.1, which should fix two issues with Cloud Save not working, and saving a local file showing an "Open" dialog instead.

  • If you're worried about security, this does nothing at all to improve the security of your game. Anyone who wants to access the local resources or code can do.

  • We moved away precisely because it is virtually impossible to get those features you noted to work. Rather than support a platform where a wide range of features simply cannot be supported, we instead focused on the standard system webview, which has reasonably good performance and supports almost all features.

  • On most devices, the normal Cordova webview performs well.

  • Construct 2 dropped support for Canvas+ around 4 years ago, so it's been unsupported for years now. That's probably why things don't work. You shouldn't use it any more.

  • FYI Construct 2 dropped support for Canvas+ around 4 years ago, so it's been unsupported for years now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct 2's NW.js exports can work on Mac, but you must configure the file permissions. This is because Windows doesn't understand the same file permissions that Mac uses so omits them. This happens at the OS filesystem level and is not directly due to Construct. Then when you copy files without the file permissions the executable files are not marked executable so cannot be run; adding the executable permission back fixes it.

    Construct 3 works around this by exporting a zip file, and configuring the zip file permissions. This means as long as you extract the zip on a Mac, the file permissions are correct and it works out-of-the-box. However if you extract it on Windows then copy to Mac the same problem happens, because Windows doesn't understand the file permissions again. There's no workaround to that; Windows just works differently.

  • Ashley, would it make sense to offer an import of sprites, and spritesheets, via TexturePacker?

    Not really - firstly this still has the same problem: as soon as you edit anything Construct will throw out the old spritesheets and create new ones, essentially undoing anything that was done in TexturePacker. Secondly Construct sometimes packs spritesheets differently depending on project settings, e.g. downscaling quality. If an external tool does not respect this setting or provide it as an option, it's incompatible with that project setting, meaning Construct has to either re-pack the spritesheets itself (again undoing anything done by TexturePacker), or ignore the project setting (creating the possibility of issues like graphical glitches that appear if TexturePacker created a spritesheet without using the same algorithm Construct does in high-quality downscaling mode).

    I think the best option would be to be able to choose which sprites go into algorism, an option within the properties of the sprite would solve all the "problem".

    So presumably you'd want to configure this to reduce memory use. In that case it's even better if Construct can do this automatically for you. We have an upcoming change designed to do exactly that.

    Maybe set a max spritesheet size?

    I was going to add exactly this for the next beta cycle - I've already tested it and it seems to be the single thing that makes the biggest difference (moreso even than packing objects that are used together on the same sheets). It's a shame this can't be detected automatically - I want to try to avoid ending up with loads of advanced project settings that all need to be configured just right - but at least the option's there in case you need it.

    I am sceptical that adding any other more options would be useful. Packing spritesheets is actually a far more complex and subtle process than most people imagine. You might just think it means "throw a lot of images on to one larger image". Suppose you then start downscaling images a long way with mipmapping enabled (which it is in Construct for best quality rendering), and find that bleed happens on the lower mip levels. Turning off mipmaps is actually slower, so is not a good solution. Adding padding at first looks like it solves this, but actually just postpones the problem to a lower mip level, where it still happens. So then the best approach is to position and pad at power-of-two sizes so only the very lowest mip levels exhibit any bleed. Then you find transparency still bleeds in to the edge pixels. So you need to repeat the outer pixels of the image. Repeating it once doesn't solve the problem for low mip levels, because transparency still bleeds in again. So you need to repeat the outer pixels until they fill the entire power-of-two sized cell it's been placed in. Then for good measure, center the image within that.

    This is just a single aspect of spritesheeting, regarding resizing smaller. It has been directly informed by bug reports from real users with real problems. There are many other caveats involving memory usage, efficiency, compatibility, rendering quality, etc. I think this has led Construct to a more sophisticated spritesheeting algorithm than other tools. For example I don't think I've seen any other tools that provide an option for automatic power-of-two padding to solve the mipmapping bleed issue. Providing a customisable padding is the first-level solution to that, but doesn't really solve the problem properly; the power-of-two padding is the second-level solution that we've ended up with. So to me this looks like they have not yet run in to all the same issues as we have yet, so have not developed the algorithm as far along as we have. This is the case in other areas too, such as repeating the outer pixels in to the padding to avoid bleed either between other images, or with the transparent background of the spritesheet, since it ensures even fractional texture sampling right at the edge of an image returns the same color pixel.

    On top of that, AFAIK there's no reason to keep spritesheets square, it simply wastes memory. It's impossible to keep everything on one sheet, because eventually you hit the maximum texture size limit - avoiding that makes multiple spritesheets mandatory. And so on.

    In short I think we have a much more refined and well-developed spritesheeting engine than most people think. Adding more options unnecessarily burdens users with difficult technical choices with tradeoffs they might not understand, and in some cases are wasteful or unnecessary. Since it makes a big difference I think the max spritesheet size is the sole exception to this. It'll turn up in the next beta cycle so you can try it out.

    • Post link icon

    Launch external editor doesn't work for me, it just spins eventually returns control after a minute or so. It works for me in the desktop build though.

    Please report any bugs to the issue tracker following all the guidelines.

  • Yes, it is. There's a new JSON object.

  • By that strict definition you could just check to see if the angle is greater than zero.

    It's not clear to me if you are actually suggesting to do this, but this is another case of incorrectly making linear comparisons on angles.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,830,236 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x126
    Coach One of your tutorials has over 1,000 readers
  • x74
    Educator One of your tutorials has over 10,000 readers
  • x5
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x44
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs