Magistross's Recent Forum Activity

  • It's getting quite irritating. That, and having to read "should not of" instead of "should not have" everytime! :P

  • Essentially, the console is accessible by pressing F12 to open DevTools, and clicking on the "Console" tab. You should see some initialization message, and most probably an error message.

  • Open the javascript console, there's probably a thrown exception which could give us a hint as to what is happening.

  • I want to add one small UI issue - when you have lots of functions in the project, "Set return value" action becomes buried in them:

    By giving your functions their own "Category" it won't clutter the "Functions" category. Not perfect, but it becomes easier to spot the lone "Set return value" that way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I could not test the BinaryObject properly since it seems it can't load padded base64 (filed a bug report for that).

    However, 1 of your image in your example was not padded so I could test a bit. The JS Heap was still badly overused, although I did not test for any kind of difference in terms of lag.

  • It's not the execution time that is troublesome, it's all the memory allocation overhead of the whole process. Memory get allocated at a high pace and also quickly become flagged for collection, thus the regular garbage collection.

    First I thought using the BinaryData object would reduce the problem, but it seems to be plagued by the same excessive memory allocation...

  • Well, the bottleneck here is really the multiple calls to "Load image from URL", so as long as it stays the only way to edit a sprite's image data, achieving something truly dynamic AND performant seems out of the question.

  • I don't think it's a good idea as a whole to continually load image data. I don't know the inner workings of the engine, but I believe it's not optimized in any way to do something like that.

    What could work, however, is to create a lot of placeholder animations and animation frames. During your loading phase, preload all of the image data into said placeholder animations/frames. You'd be able to use C3 animation engine that way, although you could also set every animation speed to 0 and create your own.

  • I don't think there is an expression or condition to check whether an instance is global. So you'll have to create your own property. Maybe a family instance variable, that you set to true with various "on created" triggers of your global members of the family.

    If you only need to test one UID at a time, you could also create another family but only add your global "Cork" ("CorkGlobal"). You could then have a function that test if "pick by UID" returns 1 instance in both family, indicating that your "Cork" is also a "CorkGlobal".

  • You can probably load an empty image from a dataURI on layout changes.

    Someone claimed this is the tinyest transparent GIF : "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="

    So "Load image from URL" and insert that previous line.

  • You can use the "AsJSON" expression to retrieve all properties from an object serialized in JSON, and then use the "Set from JSON" action to load said properties an another object.

    edit: Ninja'd

  • Well rounding is inherent to shortening the number. There wouldn't be much use display, say, "1.234567M" instead of "1 234 567". However, the function I made can round to the desired decimal place. The second parameter is the decimal place count that you wish to have. I guess 3 decimal places would be the just compromise.

Magistross's avatar

Magistross

Member since 4 Jul, 2011

Twitter
Magistross has 14 followers

Trophy Case

  • 13-Year Club
  • Entrepreneur Sold something in the asset store
  • 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
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

20/44
How to earn trophies