[PLUGIN] Paster

Post your completed addons to share with the community

Post » Tue Jun 27, 2017 7:31 pm

Can you convert this to C3?
Image
B
24
S
13
G
11
Posts: 277
Reputation: 8,685

Post » Tue Jun 27, 2017 7:35 pm

@LaurenceBedford
No. The sdk doesn't support a plugin like this currently and I don't think I have enough time or interest to do it if it did.
B
92
S
32
G
106
Posts: 5,273
Reputation: 69,457

Post » Tue Jun 27, 2017 7:48 pm

@ROJOhound is there another way to do split screen without plugins?
Image
B
24
S
13
G
11
Posts: 277
Reputation: 8,685

Post » Tue Jun 27, 2017 8:04 pm

Maybe double all your objects on separate layers and use blend modes with rectangles to clip stuff to a view. To be faster you'd probably just use events and behaviors on the first originals and position the copies. There are likely lots features that wouldn't work well with that though.
B
92
S
32
G
106
Posts: 5,273
Reputation: 69,457

Post » Thu Aug 31, 2017 1:34 pm

Would it be possible to load a paster texture into a sprite?
I'm wondering because I plan on using paster as a "terrain destruction" particle; it would paste the tile, destroy it and act as a particle with Litetween and Bullet behavior and I guess that lots of sprites would be less cpu consuming than pasters.

Also, I'm curious; how does a Paster with a texture loaded (16x16 for example) compare to a Sprite performance-wise?

Thanks in advance

Edit: fixed a thing, my browser had a little seizure
B
9
S
3
Posts: 152
Reputation: 1,270

Post » Thu Aug 31, 2017 4:13 pm

I can see that @R0J0hound is probably not really interested in these older plugins, but... perhaps there is a small chance of having a look at this:

It seems like if you have Shaders that rely on extend-box-horizontal and extend-box-vertical to work they get messed up when pasting (things that happen on the very edge do not happen), because, I'm assuming, Paster doesn't add anything to the sprite size. An option to overcome this is not having your sprite fill the entirety of the image, even a 1px transparent "outline" helps, BUT... in my case that's not an option, need to have the correct sprite size.

Tried looking into the source code, it seems like there may have been something that deals with this, but it's commented out. My skills are insufficient to figure it out... if there's any chance of @R0J0hound or someone else who understands plugins to look at this I would be eternally grateful.

To make it easier I have prepared a little demo capx (with the shader included): h t t p s ://files . fm/u/7epu5z3v#_

And example images here: h t t p : //imgur . com/a/1rlYp (Will have to remove spaces, sorry).
B
6
S
1
G
1
Posts: 14
Reputation: 883

Post » Thu Aug 31, 2017 5:04 pm

@ydobemos
Hello, I don't have a solution for that. When making the plugin I took the functions C2 uses to draw effects and modified them, since I couldn't leverage them as is. I also made gross simplifications neglecting a lot of the features effects support in C2.

Anyways the solution would be to re-examine how C2 draws effects and get familiar with what it does and why. Then start over from scratch to come up with a solution. Paster can be utilized as example for some aspects but not all. Bear in mind this is what has needed to be done since I made the plugin and I never had the time or interest in doing so even when I was actively developing it.
B
92
S
32
G
106
Posts: 5,273
Reputation: 69,457

Post » Thu Aug 31, 2017 6:15 pm

@R0J0hound
Thanks for the reply! I see. It's more than likely that in that case I'll just add more transparent padding to the sprites and try to use math to resize them properly to keep exact sizes needed...

But also does this mean I have your blessing to try and modify Paster should I decide to go down that path?
B
6
S
1
G
1
Posts: 14
Reputation: 883

Post » Thu Aug 31, 2017 6:29 pm

go for it
B
92
S
32
G
106
Posts: 5,273
Reputation: 69,457

Post » Fri Sep 01, 2017 2:21 pm

Actually it helps to sleep on a problem...

Yesterday I was digging into the code and hitting walls everywhere, when today I realized the solution was right there the whole time!

Well, it's a stupid, lazy solution, but still: Just use a Temp Paster object that's bigger than your sprite, For each sprite paste the sprite into the Temp Paster, apply the shader effects to that and paste that into your main Paster object. Voila!

Image

Reduced the resolution on purpose, so we can see it working. Works well enough for my needs. Thanks again for making such a great plugin.
B
6
S
1
G
1
Posts: 14
Reputation: 883

Previous

Return to Completed Addons

Who is online

Users browsing this forum: norman74 and 3 guests