R0J0hound's Forum Posts

  • Sprite: x < player.x

    --- Sprite: simulate platform pressing right

    Sprite: x > player.x

    --- Sprite: simulate platform pressing left

  • The simplest way is to place the paster object where you want the water to be, then make an event like this:

    every tick

    --- paster: clear to rgba(0,0,0,0)

    --- paster: set height to -self.height

    --- paster: paste smileSprite

    --- paster: set height to -self.height

    and that's it. If you have multiple objects you want to reflect put more paste actions in there.

    A slightly more deluxe method that reflects an entire layer would be this:

  • Toon doesn't create outlines of objects.

    Here's a non-webgl way to do outlines with the paster object.

    https://dl.dropboxusercontent.com/u/542 ... tline.capx

  • That line just makes a faction for each chain. So if there are three links then the fractions would be:

    A-------------B
        ^    ^    ^
       1/3  2/3  3/3[/code:33u2zxe7]
    Then that fraction is used later with the lerp to position the links.
    
    I'd just do this instead to do the chains.  In a way it's more straightforward.
    [code:33u2zxe7]every tick
    --- destroy chain
    
    for each startSprite
    endsprite: id = startsprite.id
    repeat startsprite.chainAmount times
    --- create chain at (0,0)
    --- chain: set x to lerp(startsprite.x, endsprite.x, loopindex/(startsprite.chainAmount+1))
    --- chain: set y to lerp(startsprite.y, endsprite.y, loopindex/(startsprite.chainAmount+1))
    --- chain: set angle to angle(startsprite.x, startsprite.y, endsprite.x, endsprite.y)[/code:33u2zxe7]
  • To make it one object you can either use a tilemap or use a paster/canvas object.

    You can draw the terrain to the canvas or paster object, so you'd have only one object. It doesn't do anything for collisions though.

    With a tilemap you just set the tiles with events and you get collisions no problem.

    As far as wrapping you'll not want a single object.

    With just sprites as you have you could do this:

    sprite: x < viewportLeft

    --- sprite: set x to self.x + layoutWidth

    You could also reduce the number of objects to one's on screen and just update them from the array as the player moves.

  • Why not just create your graphics with outlines?

    Another option would be to use the paster object to only create outlines for the stuff on screen. Basically paste all the objects you want to have an outline to it. Make it all black by pasting a all black object to it with a blend mode. Then finally pasting it to a second object in all 8 directions.

    The shader would likely be the fastest. I don't use webgl anymore so I haven't touched the effect in a while.

  • Look at the canvas or paster plugins. A search will also give some examples of doing this.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The latest version of nw.js:

    https://www.scirra.com/nwjs

  • You just select file->export project, and select html5.

    https://www.scirra.com/manual/122/expor ... publishing

  • "every tick" isn't the issue, even with nothing in the project the mem usage goes up slightly in NW.js. When run in the browser the profiling tools say the mem usage is basically constant, so it's probably an issue with NW.js. Do you have the latest?

  • Use a layer. Make the objects not be transparent at all, instead make the layer they're on transparent.

  • You can use the .asJSON expression to get a copy of a object's state, then you can use the "load from json" action to load it later.

    One way to utilize that is to save it to a global variable on the end of one layout and load it at the start of another. Or another idea would be to make the object global so it wouldn't be destroyed.

    If you don't want the warmup at all then you could temporarily add a edit box and set it's text to the particles.asjson once they cover the screen. Next copy that text to your favorite text editor and replace all the " with '. Then put " around the whole thing, it is now a valid text that can be used expressions. So you can make it load that into the object at the start of the layout.

  • There isn't one, but if there was it would do the same thing as setting the layout angle and scroll position.

    I guess you could look at the magicam plugin but that's mainly for camera transitions.

  • No, it's just an issue with my plugin.

  • Put it in another event sheet and include that sheet in the level event sheets.