[PLUGIN] Paster

Post your completed addons to share with the community

Post » Sun Sep 11, 2016 10:19 pm

@frozenen
The light's blend mode seems to be most of the issue. I can't come up with an easy fix but you probably can get it to work by being specific as possible.

When it's single screen the light layer is black and you erase the lights from it.
When it's split screen you need to replicate the layer with another paster to get it to work. As it is now it's drawing the light as if it's on the same layer.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Sun Sep 18, 2016 7:05 pm

I'm trying to figure a good way to design my levels. I was considering using lots of tilemaps, that don't fill the entire layout, and overlay each other.
It seems like pasting all these to a paster object at beginning (then deleting the tilemaps) would improve performance, since the paster only requires one draw versus the many tilemaps with numerous draw calls.
Is my thinking correct, in that using a single paster object would benefit rendering in this case?

edit: also, does it render the whole paster object even if it only shows a portion on screen? Perhaps it wouldn't help performance?
edit: "GPUs are also well-designed enough to only process the on-screen parts of an object that appears partially off-screen. So literally nothing outside the window area is ever rendered by the GPU."
So I guess it only renders what is visible.
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Sun Sep 18, 2016 7:27 pm

Prominent wrote:I'm trying to figure a good way to design my levels. I was considering using lots of tilemaps, that don't fill the entire layout, and overlay each other.
It seems like pasting all these to a paster object at beginning (then deleting the tilemaps) would improve performance, since the paster only requires one draw versus the many tilemaps with numerous draw calls.
Is my thinking correct, in that using a single paster object would benefit rendering in this case?

edit: also, does it render the whole paster object even if it only shows a portion on screen? Perhaps it wouldn't help performance?
edit: "GPUs are also well-designed enough to only process the on-screen parts of an object that appears partially off-screen. So literally nothing outside the window area is ever rendered by the GPU."
So I guess it only renders what is visible.


If you have a lot of overlapping tilemaps, Paster is the way to go. Tilemaps in C2 are very slow and not all that optimized (compared to other implementations).
B
89
S
47
G
25
Posts: 535
Reputation: 21,827

Post » Sun Sep 18, 2016 7:39 pm

Cool, I guess I will try this method then.
If I run into any issues, I'll post them here.
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

Post » Mon Nov 14, 2016 3:21 am

Hello,

I'm having issues when pasting objects that have your Outline effect applied. When pasting, it draws black pixels around sprites outline. This only happens under Node Webkit export not preview as far as I know.

Do you know something about this ?

I found later that it may be related to Outline effect only, and not Paster, but I don't know.
B
14
S
4
Posts: 112
Reputation: 1,287

Post » Tue Nov 15, 2016 12:56 am

@Nabu0001
I don't use effects but as far as I know the only issue with the outline effect was being thicker on export but that was corrected in C2's renderer a few releases ago.

Now the paster object doen't behave the same way as C2's renderer when using effects, so results will be different in a lot of cases. So yeah, it's a bug in the paster plugin but I probably won't get around to fixing it.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Tue Nov 15, 2016 1:17 am

@R0J0hound,

Because it's tricky to fix it ? Or maybe you got no time.

By the way, thanks for clarifying.
B
14
S
4
Posts: 112
Reputation: 1,287

Post » Tue Nov 15, 2016 1:59 am

@Nabu0001
Both really. The issue has been known by me since I made the plugin. It's not a trivial fix and I haven't found it to be worth the effort to attempt making it work correctly. Also as of late I don't spend much time coding.
B
94
S
33
G
118
Posts: 5,396
Reputation: 75,853

Post » Tue Nov 15, 2016 4:49 am

digitalsoapbox wrote:
Prominent wrote:I'm trying to figure a good way to design my levels. I was considering using lots of tilemaps, that don't fill the entire layout, and overlay each other.
It seems like pasting all these to a paster object at beginning (then deleting the tilemaps) would improve performance, since the paster only requires one draw versus the many tilemaps with numerous draw calls.
Is my thinking correct, in that using a single paster object would benefit rendering in this case?

edit: also, does it render the whole paster object even if it only shows a portion on screen? Perhaps it wouldn't help performance?
edit: "GPUs are also well-designed enough to only process the on-screen parts of an object that appears partially off-screen. So literally nothing outside the window area is ever rendered by the GPU."
So I guess it only renders what is visible.


If you have a lot of overlapping tilemaps, Paster is the way to go. Tilemaps in C2 are very slow and not all that optimized (compared to other implementations).


Id like to test this out. My game has some overlapping tilemaps and im interested in anything that could improve performance.
But I'm not sure how to get the tilemap information to paste into the Paster object at the beginning of each different level? Can anyone advise me how to do that pls?
B
74
S
52
G
62
Posts: 406
Reputation: 39,080

Post » Tue Nov 15, 2016 6:39 am

What I did was size the paster object to the layout dimensions, and then resize the viewport to the layout dimensions, paste the tilemaps in the order I want them, then resize the viewport back to the normal size. You have to resize the viewport because tilemaps won't draw tiles that are offscreen. If you have a lot of tilemaps it may take a second or two to paste them all, which means you'll need to use something to cover up your level while it is sized to the layout so that you can't see everything. I used a separate layer with black background and I make is visible during that pasting, and then invisible when the viewport goes back to normal. I also delete the tilemaps as they get pasted.
B
48
S
23
G
66
Posts: 1,144
Reputation: 39,059

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests