Ashley's Recent Forum Activity

  • I would love to be able to put a sprite as a parameter or other objects as parameters.

    The standard approach at the moment is to pass an object's UID, and pick it in the function again.

  • (bump to work around forum bug preventing previous post appearing)

  • It should be straightforward once you get used to using AJAX to load a URL in to a Binary Data object. Here's an example that takes a canvas snapshot and posts it to a URL: post-snapshot.c3p

    It posts to example.com - just replace that with your own URL.

    As the comment in the events explains, you can also use the BinaryData.GetBase64 expression to convert the canvas snapshot to a base64 string. However in this case that will only serve to make it slower and less efficient.

  • You're confusing the two steps:

    1) load the canvas snapshot in to Binary Data

    2) post the data to the server

    These are two separate AJAX requests. The first should request the CanvasSnapshot URL. The second should post the Binary Data.

  • I'm not sure what the difference between the two options is in your question... it's saved to the same place as Local Storage saves.

  • Yes, please make sure you follow all the guidelines to ensure we can investigate.

  • Have you tried with the latest C3 release? We fixed an important iOS bug that affected loading textures.

  • Please do not bump threads so quickly - it looks obnoxious, and most people take at least 24 hours to revisit the forum.

    The link you provided looks like the "working images" case to me. Try clearing your browser cache, maybe it's loading parts of the old project.

  • I don’t have measurment other than my game passing from not crashing to crashing. :)

    C2 and C3 provide measurements specifically for this. I was suggesting that you look at them.

    I didn’t mention it earlier, but another big problem I have using C3 instead of C2 is the huge performance drop... My theory about this is the following: Healer’s Quest sometimes needs to load very small images that are not present on the layout in the editor (they are too situational and there are too many of them to load them all on all layouts).

    This forces a synchronous texture load and can easily cause jank in the C2 runtime. The C3 runtime actually loads textures asynchronously which should solve this problem (at the expense of possibly a couple of frames where the texture is invisible because it hasn't loaded yet - but avoiding the jank). As has always been the case, for best performance you must have every object that can be created in the layout initially placed in that layout, and destroyed on start of layout if need be; this means Construct will pre-load everything the layout uses and completely avoid any on-the-spot texture loads, which can hit performance no matter the size of image being loaded.

    Then in C3 this becomes even more important, because it analyses the objects initially placed on layouts to identify the objects that are most commonly used together, and then groups them on the same spritesheet. This can lower memory usage by making sure the images on a spritesheet are always used at the same time, helping eliminate the case where you load a big spritesheet with lots of images that aren't used.

    So this is a known case and has known workarounds. The jank from on-the-spot texture loads should be pretty much fixed in the C3 runtime thanks to its asynchronous loads, but even in the C2 runtime, if you do all of this it will make the performance even better than it was to begin with, since it won't even need to to on-the-spot texture loads even for small images.

  • It would be a lot easier to either wait, then run the entire loop; or create all the objects but hidden (e.g. make them invisible), then wait after the loop, then show them. Basically wait before or after the entire loop, but not during it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's impossible to help with such little information. Please see the bug report guidelines - we need all that information to be able to help.

  • So if I'm correct the RAM usage is MUCH higher than if every object type had its own spritesheet, as in C2. This is probably why the game is crashing all the time when exported with C3.

    You can customise the spritesheet size to help manage the tradeoff here. Do you have actual measurements to indicate the difference?

    FYI automatically generating spritesheets are extraordinarily complicated and have many subtle tradeoffs. I have worked on this extensively for years and there are a lot of surprising results. It depends entirely on the project and specific images being used. Spritesheeting can actually reduce memory usage thanks to power-of-two packing, can reduce the download size, improves runtime performance, and usually significantly improves loading times. However it comes at the cost of reducing texture memory management granularity. C3 does arrange images together based on their usage across layouts to try to mitigate this.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,772,150 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
  • x42
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs