[PLUGIN] Paster

  • Hey, I've recently run into an issue where whenever I try to have Paster or a sprite load an image by imageUrl, It will load for a split-second and then disappear. I have no idea what is causing this or how to fix it, it seems to have something to do with the imageUrls themselves.

    I'm getting all my imageUrls from Paster.imageUrl, so none of them should be messed up? Can someone help me with this?

    Does the object have more than one frame, and is its speed zero?

  • Does the object have more than one frame, and is its speed zero?

    The object has one frame with a speed of zero.

    I also just discovered that when doing it to the Paster object, shrinking the window size makes the image suddenly visible. Now, I know this has something to do with setting the resolution, but I'm not sure what to set it to since setting it to the window width/height breaks it.

  • No way to tell without an example.

    Only thing to add is that it does take a tick to grab from the gpu.

  • Hello,

    Is there a guide somewhete to help me make a split screen?

  • Eren, I know you are an export in porting plugins to C3. Do you think it's possible to port Paster?

    Yes, C3 has DrawingCanvas, but there are too many problems with it - it's slow, it doesn't support rotation, it can't paste layers etc.

  • Hi, dop2000

    I tried, but I left it unfinished.

    You need to find the equivalent of "this.runtime.glwrap" functions in "this._runtime.GetWebGLRenderer()" functions.

    Since some codes are taken directly from c2runtime, you may need to write them from scratch in c3.

    Maybe I can continue the convert in the future, but it would be more sense to include the features you said in the official canvas plugin.

  • mathie

    There are some quite good youtube tutorials on how to to make splitscreen with paster.

    Here is a short version:

    1. Create 2 Paster objects with the size of 1/2 screen. Place one on the top side of the window and the other one below it.

    Example: Your screen has a 1200/600 pixel rate. Both Paster objects have a size of 1200/300 and their hotspot is in the middle. You now put the first one to position X 600 and Y 150. The 2nd Paster is on X 600 and Y 450.

    2. You'll need Families for this to work elegant. Create a Family where you put ALL objects you want to paste. If you have tiled backgrounds, you will need to paste them in seperately BEFORE the Family. Sprite fonts somehow are not supported by this add on, so you can't paste them.

    3. Create 2 players.

    4. Event Sheet:

    Every Tick:

    Paster clear to RGBA (0,0,0,0) //to clear the screen from the previous frame

    Paster set position to Player1.X, Player1.Y

    Paster paste Object "AllObjectsFamily" into canvas

    Paster set position to X 600, Y 150

    Repeat that with Paster2, just change Player1 to Player2 and the end position to the position of your 2nd paster (X 600, Y 450 in my example above)

  • Hi, i was wondering if paster could be used with blend mode too, i'm trying to paste all objects on canvas and after put a sprite (a circle) that should display what is on canvas but with circle form, actually i'm trying it and i'm seeing doesn't work, always a square/rectangle.. like it forces his own draws. Can you help me?

  • I have been racking my brain on how to save and load a paster image.

    Player would draw something, save it to local storage then reload it again to paster.

    Does anyone have any insight on saving and loading?

    Thank you!

  • You can save Paster.imageUrl, it contains image data in BASE64 format.

    To load it back, use "Load image" action.

    Note that BASE64 is very bloated format, saving a large image may be quite slow.

  • Thank you kindly, dop2000. It works fantastic. Have a nice day :)

  • Any luck on converting to CS3? Paster still seems like the best option for split screen. There are so many issues with Canvas and blending alternatives.

    Thanks for all the work you guys have put into this as is!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, did someone figure out how to fix the problem of the flipped past texts? So far all the solutions proposed aren't very effective and it would help a lot to make it paste texts correctly,

    Thanks in advance!

  • Hey, Tomycase!

    I couldn't get the text to work properly, however SpriteFonts work just fine.

    It took me awhile to figure out how to make custom fonts. Luckily the community is so great that they made the tools to do it.

    Check out: "[Plugin] SpriteFont+ (cleaned)" https://www.construct.net/en/forum/extending-construct-2/addons-29/plugin-spritefont-cleaned-127779

    And the: "Sprite Font Generator - v3" https://www.construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

    You can find tutorials on youtube for both. Hope this offers an alternative solution!

  • Hey there!

    That's what I've been doing for the moment using spritefont, however the problem with spritefont is that it is locked with a unique font, and need one object by different font, where you can easily change it with a single text obj, hence my question about a fix;

    I guess I'll continue with spritefont for the moment then, thanks again!

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