Ashley's Forum Posts

  • Hmm... don't think this is a bug, it's just Safari seems slower than usual at rendering tiled backgrounds. Wherever WebGL is supported they ought to be equally fast.

  • Oh, I see. I've spent a while looking in to this. I'm afraid I have absolutely no idea what's going on. It looks like an IE bug, but it works when I make a separate standalone test. There must be something in the runtime that breaks it, but I've no idea what... I'll leave this open for now, but not sure what to do about this!

  • I think the problem is 'disable collisions' takes a tick to take effect. If I move the 'disable collisions' action to 'Start of Layout' I definitely can't reproduce the problem. I think this has to be closed as it's all happening inside the physics engine, and you can't disable collisions just before actually colliding, since it hasn't updated yet.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure if node-webkit supports resolution changing, so that could be difficult. We could possibly do a low-res render and stretch to fullscreen, but I'm not sure a software renderer is going to be much good with that still.

  • Thanks, should be fixed in next build.

  • Sounds like a bug, make a report in the bugs forum if something doesn't seem to work.

  • It's only supported on iPhone after exporting at the moment. Is that what you were checking with?

  • Don't use MP3. That blog also explains why we deliberately don't support MP3.

  • The pin behavior has not changed for a long time. You probably changed something in your project.

  • Why? Won't you have the same problems as using 'Scale' mode?

  • It should be very easy to implement in Ejecta. It's a bit tricky to implement it by hacking the C2 engine.

    All Ejecta needs to do is:

    1. when setting src, just store it, don't create a texture

    2. if the image is used (e.g. passed to drawImage()),if the texture is not yet created, create it; if out of memory, release some textures that haven't been used for a while then try again.

    Should be as simple as initialising the texture to a NULL pointer, adding a function 'checkLoadTexture', and calling it in a few strategic places (e.g. at the top of drawImage's implementation). Considering how straightforward it is, Ejecta really ought to support this. (CocoonJS ought to as well, but I think they decided to support it via WebGL instead.)

  • The real problem is probably out of date graphics card drivers, so it ends up using software rendering. Updating the drivers usually fixes that. Check what the 'renderer' system expression says - if it's not "webgl", you probably have bad drivers.

  • Excal - textures are loaded layout-by-layout when WebGL is supported.

    0plus1 - WebGL shouldn't be loading everything on startup, how are you measuring that? If you can see VRAM increasing to unusually large levels maybe you should file a bug about it.

    However I still disagree, Ejecta is at fault here. Browsers handle it perfectly fine, and if Ejecta's purpose is to allow you to port browser games to native, then it should act like a browser too.

    Here's what Construct 2 does:

    On startup, it creates an Image object for every object in the project, and assigns its src property. This tells the browser to download it. Browsers do *not* create a texture in memory yet, because they're smart. They either write the compressed PNG/JPEG to a disk cache, or leave the compressed file in memory if there's room. Most DOM-less engines (including CocoonJS) make the mistake of creating a texture as soon as you assign the src property. This means they crash before a real browser would have even created a single texture. Browsers only create a texture the first time you draw it.

    When a layout starts:

    • in the WebGL renderer, we explicitly create textures for objects that are on the layout.
    • in the canvas2D renderer, we draw every image for each object that is on the layout in an invisible way. Since browsers create a texture the first time it's drawn, this effectively pre-loads all textures for canvas2D, and avoids "janking" (pausing as images are loaded mid-game).

    When a layout ends:

    • in the WebGL renderer, we explicitly free textures for objects that are on the previous layout and not on the next layout.
    • in the canvas2D renderer, there's nothing we can do, it doesn't provide a way to say "release this texture" (yet, anyway). Luckily most browsers are also sufficiently smart that if they run out of memory trying to create a new texture, they'll go back, release a bunch of textures that haven't been drawn for a while, then try creating the texture again. It's a bit of a hack, but it does successfully prevent devices running out of memory as you move between lots of different large layouts.

    The problem with a lot of DOM-less engines is they are naive, and do the dumb thing of creating textures as soon as the src is assigned. The solution is to make it do what browsers do.

  • You can already export Linux desktop apps using the node-webkit exporter.

    We get a lot of requests about porting C2 to other platforms. We're aware of demand, but as a small team (just 3 of us) it's not something we will be starting for the foreseeable future.

  • Construct 2 shows an estimate in the status bar in the latest builds. At runtime some browsers can show you WebGL memory use, in Firefox you can check in about:memory IIRC.