[PLUGIN] Paster

Post your completed addons to share with the community

Post » Sun Jan 24, 2016 6:50 pm

Awesome
B
28
S
11
G
2
Posts: 688
Reputation: 5,126

Post » Thu Feb 04, 2016 11:47 pm

hi rojo,
i'm not sure if this is supposed to work, or if it's a limitation

hit space during preview to paste the two lights:
https://www.dropbox.com/s/2qvvmfpzeddim ... capx?raw=1

the objects sprite is white, but the object has Tint effect to color the instances differently. The blending mode set to additive
on start of layout, the red and green sprite combine to make yellow, after its pasted, it loses that additive appearance.

thanks!

edit: some more info:
the additive appearance works if you have coloured sprites -without- the tint effect: https://www.dropbox.com/s/fbyi61fgv5v9z ... capx?raw=1
(but it is not practical for my game without tint)
and of course, the tint effect works by itself: https://www.dropbox.com/s/1zczb6jzpqlqx ... capx?raw=1

So my problem only exists when both Tint and Additive are combined

One work around I was going to do was that i go without tint and make a function that creates a (tintless) overlapping Red, Green and Blue additive sprites, and simply vary their opacities to get the exact RGB value appearance I want. But I thought i should check with you first! thanks
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Fri Feb 05, 2016 2:41 am

@keepee
It's a bug. I never implemented pasting multiple effect objects correctly. Basically the plugin needs to be updated to draw exactly like c2's runtime does, but I haven't gotten to it yet.
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Wed Feb 17, 2016 6:54 am

I was pointed in this direction. I need to load a jpe with a text box. Then be able to save a jpg of the canvas with the new text as a jpg.

Will this do it?
Or can I get an example or loading a jped in to Paster and then saving it with a button press?

thanks
B
29
S
8
G
8
Posts: 531
Reputation: 7,181

Post » Wed Feb 17, 2016 4:08 pm

@guyon
You don't need to use this to do that. And in fact this only saves png as I recall.

You can do it with vanilla c2. Add a Sprite and you can load a frame from URL. Then put the text on top like you want. Next you can you c2's snapshot action to capture it. Just set the viewport size to the image size you want to capture and scroll to the center of the location you want to capture.
Basically:

On click
--- set viewport size to 128x256
--- scroll to sprite
--- snapshot canvas as jpeg

On snapshot
--- browser: invoke download snapshoturl

You might need to add a wait 0 in there to get the view to update before capturing.
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Fri Feb 19, 2016 7:07 pm

I don't want to hyjack the thread so here is my last question.
I created a dummy sprite and made a button:
ON Button- On Clicked- Sprite- Load image from "MyDog.jpg"

When I click the button noting happens. I also tired using a png. Both program and image are in the same directory.
B
29
S
8
G
8
Posts: 531
Reputation: 7,181

Post » Fri Feb 19, 2016 7:45 pm

@Guyon
I think you need to do:
nwjs.AppFolder&"mydog.jpg"
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Sat Feb 27, 2016 1:30 am

@R0J0hound

Hello, I need to implement a split screen in my game (2, 3 or 4 split-screens). Is there any way to copy the layout only in a section of one Paster object, or I need to use 2~4 separate Paster objects ?

Also, my primary target are mobiles (browsers/WebGL). Which should I use for a better optimization (better performance) Paster or Canvas ?
B
49
S
15
G
6
Posts: 535
Reputation: 7,197

Post » Sat Feb 27, 2016 11:37 pm

@TGeorgeMihai
You probably could do that with only two paster objects. One to paste a players view and then a second that you paste the views to.

Use paster if the game has webgl on, otherwise it doesn't matter, you can use either.
B
94
S
33
G
113
Posts: 5,356
Reputation: 73,273

Post » Sun Feb 28, 2016 6:14 pm

thxx
B
7
S
3
G
1
Posts: 107
Reputation: 1,018

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 6 guests