[PLUGIN] Paster

From the Asset Store
The I18N (Translation) is a Construct plugin created to translate text in game.
  • I'd love to try this plugin out, however, I'm having trouble installing it...

    From the C2 manual:

    To install a third party plugin:

    Close Construct 2

    Copy the plugin's folder to <install path>\exporters\html5\plugins. You'll see each plugin has its own folder here, so to add a new plugin create a new folder and add the plugin's files inside it. For behaviors, copy to <install path>\exporters\html5\behaviors instead.

    Launch Construct 2 and the plugin or behavior should be available from the editor.

    However, I only see one "Paster.c2addon" file to download -- perhaps I'm missing the rest of the files somewhere? Runtime, pluginIcon, etc?

    -Confused.

    Paster 0.5 alpha

    Here's a new plugin that is like the canvas plugin in that you can draw (or paste) other objects onto it's texture. It's simpler though and doesn't have any additional drawing features. The big difference is this plugin cleanly uses webgl and allows pasting objects with effects.

    Actions:

    - Paste object

    - Set resolution

    - clear with color

    - Draw Quad

    Key features:

    - Works fast with canvas2d and webgl, without the slowdown the canvas plugin had.

    - Paste objects with webgl effects applied.

    As a side note it's labeled as alpha since the effect rendering isn't complete yet so there are cases where effects aren't drawn right. Also the eventual plan is to merge the webgl fixes back to the canvas plugin, but I'll need to come up with ways to replicate all it's features in just webgl.

    Download:

    https://dl.dropboxusercontent.com/u/542 ... er.c2addon

    pre r160

    https://dl.dropboxusercontent.com/u/542 ... 60.c2addon

    Demo:

    https://dl.dropboxusercontent.com/u/542 ... index.html

    Example capx [broken]:

    https://dl.dropboxusercontent.com/u/542 ... 2014-02-09 19:54:04

  • remy-jay

    From manual: "Simply download the .c2addon file, then drag and drop the file in to the Construct 2 window. Construct 2 will prompt to ask if you want to install the addon. If you approve the install, you must restart Construct 2 before the addon becomes available."

    Installing third-party addons

  • remy-jay

    From manual: "Simply download the .c2addon file, then drag and drop the file in to the Construct 2 window. Construct 2 will prompt to ask if you want to install the addon. If you approve the install, you must restart Construct 2 before the addon becomes available."

    Installing third-party addons

    Bah, thanks

    All good now.

  • Hi All,

    Me again.... In the example I have attached, I only seem to be able to get the Paster object to work with WebGL OFF, when I turn WebGL ON, I can't draw to the paster object.. (Try holding the mouse button down and defacing the Apple)

    From rojohound s text it sounds like WebGL should be supported...

    "Paster 0.5 alpha

    Here's a new plugin that is like the canvas plugin in that you can draw (or paste) other objects onto it's texture. It's simpler though and doesn't have any additional drawing features. The big difference is this plugin cleanly uses webgl and allows pasting objects with effects."

    Any ideas anyone?

  • It's a difference between webgl and html canvas rendering. Webgl only draws the pixels inside a polygon whereas html canvas draws along the edge as well. For a solution you can use a sprite for the line and paste it to paster.

    Here's a way to position a line:

    https://www.scirra.com/forum/viewtopic.php?f=147&t=76296&p=631921&hilit=line#p631921

  • R0J0hound

    I am playing little with your example from page 3 and i have some wierd results when i:

    1. when i change z order of points when on same layer

    2. move upper points to newly created layer 2

    are those features or bugs?

    https://dl.dropboxusercontent.com/u/169390986/PUB/paster2layers.capx

  • R0J0hound

    Please, check this example:

    https://dl.dropboxusercontent.com/u/169390986/PUB/paster2layers-part2.capx

    You can notice that PIN worky only if object moves... if layer scrolls than its not...

    (use up-down arrows to notice that it dont work)

    (use left-right arrows to see how it works works)

    ...thats how i was intented to use paster in my project

    Is possible to make it work without need for object to move?

  • irina

    For the first capx the issue is the layer scales aren't considered currently.

    The second capx is the same. So moving the objects is a solution or you can maybe look into the system expressions to convert layer positions to screen and vise versa.

  • irina

    So moving the objects is a solution or you can maybe look into the system expressions to convert layer positions to screen and vise versa.

    Since moving is not an option... can you please elaborate more on this system expressions please?

    thank you.

  • irina

    From the C2 manual:

    https://www.scirra.com/manual/126/system-expressions

    [quote:3dttumq0]CanvasToLayerX(layer)

    CanvasToLayerY(layer)

    Calculate the layout co-ordinates underneath a position in canvas co-ordinates for a given layer.

    LayerToCanvasX(layer)

    LayerToCanvasY(layer)

    Calculate the canvas co-ordinates above a position in layout co-ordinates for a given layer.

  • Thank you... i'll look into that!

    Cheers!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • R0J0hound

    I've been getting an issue w/ the plugin not working since it hit 0.5. 0.4 works fine, even in more recent versions of C2 (like the recent beta with shadows), but 0.5, when pasting into a canvas, ends up not pasting anything at all.

    Has something changed that may be causing this? It's happening on every computer I've tried it on, with nVidia/AMD/Intel chipsets, so I don't think it's related to my video card.

  • digitalsoapbox

    I can't reproduce the issue. It's working fine here in Firefox, Chrome and NodeWebkit. Can you post a capx with the issue?

  • R0J0hound

    Here's a screenshot of the code that pastes the sprites into the Paster object. What it does is pick a canvas with the same ID as that assigned to the sprite's layer (defined in varibles in both the Paster object & sprite), pastes the sprite into that Paster object, then deletes itself.

    It works fine w/ 0.4, and also works if I'm using Canvas objects instead of Paster objects (it's just a LOT slower). It just doesn't paste the sprites using 0.5. I've also tried it on multiple machines, Windows 7 x64 on three of them (nVidia GTX 750i, nVidia GTX 770 Superclocked, nVidia Quadro K5000M) & Windows 8.1 x32 on another (Tablet PC, not sure on GPU).

  • Awesome WebGL plugin! Not sure if this has been asked but will it be possible to clear the WebGL area to a clear colour instead of an opaque one?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)