Ashley's Forum Posts

  • I think Ludei are planning this. Closing as Ludei need to add it.

  • Should be working in r103.

  • Should be fixed in r103.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • People often find this confusing, but it's quite straightforward once you get your head round it.

    Most things happen in layout co-ordinates. These are the co-ordinates shown in the status bar when moving the mouse in the layout view: (0,0) at the top-left of the layout constantly increasing as you travel down to the bottom-right corner of the layout. Think of it like the "game world", happening independently of the screen. (This is "model" and "view" separation, where the layout is the model and the screen is the view, which is how it is actually designed internally as well.)

    Canvas co-ordinates (or sometimes 'screen co-ordinates') are the physical pixels on your screen. So 0,0 is always the top left pixel of the canvas, regardless of where you've scrolled to.

    The viewport is simply where the edges of the screen are in layout co-ordinates.

    Everything is in layout co-ordinates, except for 'AbsoluteX' and 'AbsoluteY' which refer to canvas co-ordinates.

    I think the main source of confusion is layout co-ordinates by default line up with canvas co-ordinates, so it's easy to get mixed up. Imagine a football pitch and some people playing a game. Then if you place a camera above the pitch looking down, as you move the camera around you see the pitch differently: bigger, smaller, or rotated. The players and the pitch itself aren't changing size or rotating! They're playing exactly the same game at the same size, but the view is changing, so they appear at different sizes and angles depending on where the camera is. Changing the scale or angle of a layout or layer effectively moves the camera. (Mathematically, it is changing how layout co-ordinates are translated in to canvas co-ordinates.)

    I think some people assume that increasing the layout scale makes all the objects get bigger. This is like saying on TV it zooms in by making all the players and the entire stadium grow really huge! Instead think about the layout scale like the camera moving closer, and all the objects in the layout are still the same size and using the same co-ordinates.

    You can go on to talk about browser and monitor co-ordinates, but it's pretty confusing really - generally you only need to think about layout co-ordinates and canvas co-ordinates.

  • GamerGon - I think you're a little confused - images aren't really needed in RAM because they're rendered by the GPU so have to be in VRAM instead.

    • Post link icon

    —: I tested it in Chrome 21 and it worked fine. However in Chrome beta and canary (currently 22 and 23) it didn't work because Google tweaked the way Gamepad support worked in them. Thanks for the heads up - it's fixed to use the new way in the next build.

  • Thanks, should be fixed in next build.

  • Oops, you're right. Fixed for next build.

  • OK, forget the last post - the dictionary object cant read json files - I thought the load action would load from file, but it only can load from hand entered text at design time.

    But you can enter an expression returning a string, you don't have to type it out. For example you can AJAX request a JSON project file and load that. See Using project files in Construct 2 for some examples.

    Note the JSON format used by Dictionary and Array is specific to C2 - export some JSON from empty objects and look at the result to see the format you need to use.

  • Have you seen the 'move to mouse' example in Construct 2's examples folder?

  • Some algorithms do not lend themselves well to shaders. I'm not sure how metaballs work specifically, but 'flood fill' is typically impossible with a shader, or not possible in a way which is remotely efficient. Remember a shader is effectively called for every pixel simultaneously, rather than sequentially. So if you need to take in to account surrounding pixels you need to make lots of extra calls to texture2D(), and the more you add the slower it'll be, especially on mobile.

  • If it's updated in real time, there are currently no features in C2 that are suitable. AJAX is not designed for real time use. You'll need something like WebSockets, which we have on our todo list, but are holding off supporting until UDP transmission is supported (which makes it even better for real-time use).

  • The only efficient way to do this is build a single large JSON string representing all the data for a level then send it all at once, and then loading that in to the Array object. I hope you're not planning to send all 4 million rows at once though! That could be around 20mb of data...

  • There was an update to the CocoonJS launcher yesterday. Maybe the new version fixed it?

  • This is by design. Mirroring is implemented by inverting the width.