Ashley's Forum Posts

  • Closing, report does not follow the guidelines.

  • Closing, report does not follow the guidelines.

  • Closing, please follow the bug report guidelines (attach a .capx) or there is nothing we can do. If the spam blocker removes your link, delete the http:// and parts or add spaces in between them.

  • 'Load image from URL' is asynchronous: the action only starts it working, and it completes later when 'On image URL loaded' triggers. During the loading you synchronously copy and overwrite the file that is currently being loaded. This effectively makes it random which image you load, depending on which the system manages to do first: read the file, or copy the file over it.

    Further reading and writing to C:\ normally requires admin permissions on most systems, which C2 games don't run with by default.

    If you still think there is a problem, please file a new bug report that has a clearly ordered sequence of operations, and doesn't attempt to read or write files to/from system locations that normally require admin permissions to access.

  • One of the advantages of the tilemap object is that it effectively uses render cells internally all the time regardless of the layer's 'Use render cells' setting. The layer setting applies to entire objects, but tilemaps are often so large they sit in every render cell and negate its performance benefit. So to avoid that the tiles are internally split up in to cells and only ones touching the viewport are iterated.

    It also works with collision cells in a similar way, and that works especially well when you don't change the collision poly for tiles, since it can take entire rectangular areas of different kinds of tile (assuming they all use full-tile collision), and test them as a single box.

    So even if you have an extremely large tilemap object covering a huge layout, it still collision checks and renders efficiently. This is still possible to achieve with other objects, but harder. I added a note about the performance benefits to the Tilemap manual entry to highlight this.

  • Not sure why you wouldn't make the layout larger, but there's no technical limit there, so I bumped it up to 100000 for the next beta.

  • If you don't change any of the object images or animations, then simply use letterbox scale mode. Then on a 720p screen you'll get 720p display.

  • This project amounts to either having an incompatible engine, or reimplementing a considerable portion of a browser engine. If you are still considering that, you probably don't actually understand what that entails.

  • cesisco - is your iPad 2 updated to iOS 8? iOS 7 and older don't support WebGL and the iOS canvas2d mode is very slow at drawing tiled backgrounds. Since iOS 8 uses WebGL it works around this and should always be fast with tiled backgrounds.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • saiyadjin - there is no 'pow' expression in C2, only the ^ operator, which internally uses Math.pow. Javascript does not have a raise-to-power operator.

  • We don't make NW.js, so I guess you want to report this kind of issue to the NW.js project.

  • IIRC there is only one performance caveat with WebGL: large constantly changing text objects. WebGL can't render text so it uses an intermediate 2D canvas and copies that to a WebGL texture. Sprite fonts and unchanging text objects are not affected though. There's also the opportunity for third party plugins to do something incredibly slow in WebGL mode only, but that's not an official part of C2. So as long as none of that happens it should always be faster. Like I say, if you don't believe me or on the chance I missed something, I need to see .capx examples.

  • Every platform I've ever tested - which is a lot and includes obscure mobile platforms and the like - runs WebGL at least as fast as canvas2d, usually 2-5x faster, and in some cases up to 20x faster (yes, twenty times faster per sprite drawn). WebGL also supports layout-by-layout texture memory management to guarantee maximum memory usage, supports shader effects and has more advanced rendering capabilities that the engine uses in some places for even further optimisation (e.g. the rendering of particle effects is different in WebGL mode). canvas2d exists solely as a fallback for old browsers or blacklisted drivers where WebGL won't run (still ~10% of devices according to webglstats.com). In the long term future, it is likely that the canvas2d renderer will eventually be dropped in favour of WebGL rendering, because it's clearly superior and will simplify the engine code and plugin development if you only need to code for one renderer.

    If you think canvas2d is faster then please share some measurements, since I have made a lot of measurements and canvas2d is never faster, unless there's a weird bug that does something like use a software-rendered WebGL but GPU-accelerated canvas2d (which should not happen on any modern browsers because the C2 engine now specifically declines any software-rendered WebGL and falls back to canvas2d). Still there may be room for improvement in WebGL mode and I can always optimise it for a given measurable .capx.

  • Closing as not a bug: the bullet behavior's 'Set angle' property is set to 'Yes', which means it tries to sync up the object angle with the angle of motion, which contradicts what you are trying to do. Set it to 'No' and it works.

  • Picking is pretty simple in principle: either select_all is true, in which case it uses all instances, or if it's false then it uses the instances in the SOL list. However the implementation details of this tend to be tricky.

    Note you can only pick instances of the same object type or those which are referenced in object parameters - the event system does really important optimisations based on this assumption, but it means it won't work if you pick anything else. I'd also strongly recommend you don't pick anything outside of conditions, since it contradicts what the rest of C2 does. Ideally plugins can just stick to normal triggers and normal conditions.