Spriter/C2 update 11/2 bug fix for performance mode

Discussion and feedback on Construct 2

Post » Sat May 24, 2014 2:18 am

@lucid I have a problem, when I preview my project, I've attached a screenshot from the error prompt in the preview mode. I tried disabling some events (since it only crashes when the player touches the ground).

Thas started happening since I updated the spriter plugin.

Please help me, I'm stuck here because I can't do a thing.
You do not have the required permissions to view the files attached to this post.
B
8
S
2
Posts: 20
Reputation: 1,114

Post » Sat May 24, 2014 10:14 am

you must re save all your scml and scon files with the new spriter 8.1 and all the custom save options to 'on'.
then re import and hopefully your problem will be solved.
and please check to see if you have any actions or conditions that refer to a png of an scml object.(example: on colision with hand png of the scml container)
if yes, report back and i will explain further .
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Sat May 24, 2014 6:36 pm

New beta release of Spriter today contains bug fixes that are important to making sure the pro features are working correctly in C2.
If you're having any issues with sound, collision boxes, or character maps, please make sure you have the latest beta version of Spriter (you can manually check through Edit|Settings if you don't have automatic update checks set up) and the latest version of the plugin.

plugin changelog 5/24/14
  • Fixed bug that caused blending between animations to sometimes stop blending early.
  • Improved handling of changing to another animation blend before the current one has finished.
  • Improved animation blend handling of image switching by switching to the new animations' images once a blend has reached the halfway mark, resulting in smoother, more natural looking blends.
  • Fixed a bug in the scaling of collision boxes in the plugin.
  • Fixed a bug that caused certain character maps to be ignored.
  • Fixed a bug that caused sounds to be triggered every tick when an animation was paused.

You can see the new animation blending in action in the transitional and second animation blend capx's below.

PSI wrote:@lucid - some of my animations play at varying speeds and I don't know why, would you like to see my capx?

@PSI, if you sent the capx, I never got it.

dmurphy wrote:I just looked at a view videos of this program and I have to just say.... wow. I bought it almost instantly. How the hell are you guys not charging more than 25 dollars!

@dmurphy, thank you very much!

josiascaignard wrote:Thas started happening since I updated the spriter plugin.

Please help me, I'm stuck here because I can't do a thing.

@josiascaignard, as @Roccinio said, this probably has to do with needing to update Spriter and/or resave with the new save option

winsonzhong wrote:How can I change sound (footstep) while walking on different areas ?

Sound Changing capx
@winsonzhong, to do this, I just made a grounddetector collision box in Spriter for the walk animation, as well as adding the default walking sound effect which was named step.wav

Image

If you look in the capx, you can see I used a family for the ground types and a private variable to control changing the sound to alternate versions. Please let me know if you have any questions about the capx:




and it's hard to understand setting the blend mood , can make an capx for example?

Transitional Animation Blend capx
If you just want your animations to blend into eachother, you just have to choose a blend type for the animation start parameter of Set Animation, and the amount of time you want the blend to take:
Image



Manual Animation Blend capx
You can also manually control a blend between two animations, by setting a 'second animation' and then changing the blend ratio. There is also an action to end the 'second animation' style blend:
Image
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sat May 24, 2014 6:55 pm

@lucid

which is better ?

Every tick ->position to dummy sprite

Or

Add pin behavior to scml object, and pin it to dummy sprite on startup or on object created ?
B
52
S
18
G
13
Posts: 385
Reputation: 10,943

Post » Sat May 24, 2014 6:58 pm

Pinning seems cleaner, but I think they should both be equivalent now that the lagging issue is resolved.
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sat May 24, 2014 11:08 pm

Good work as always Lucid!
I asked a question about performance and to be honest i felt a little left out since i did not receive an answer :)
In all seriousness now, i never felt like you gave a clear answer regarding how much a scml file affects performance.
I understand that quite a few people that they do not see the real scope of spriter(it is revolutionary in every way and people that they do not use it,they should) might get scared if they read something negative. And since devs hate talking about performance because of the above reason i feel like there is a grey area that needs clarification.
By using one set of png's you can have a thousand animations without the extra object count.
this i know.
But what happens when you have many scml objects in one layout?
Do they tween even if they are off screen consuming resources?
Is there a way to stop this from happening ?
could you find a solution to this?
i tried to have my coins as a silky smooth scml object but after a few hundred of these my game started to slow down.
I dont want to use png's from spriter for my animations ,they look terrible compared to real time tweening and it defeats the whole purpose of Spriter.
could you please shed some light to this subject?
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Sun May 25, 2014 12:25 am

oh yes @Roccinio, I remember meaning to add that to this response, but I was holding off on responding to everyone because I found some bugs and room for improvement in the plugin while making the example capx's for winsonzhong. And I missed yours when going back through everyone's questions. Sorry about that. In any case, there's a few things I want to try before answering. I'll respond back with my findings :)

Anyone else I missed, it was a mistake, please repeat your question.
Last edited by lucid on Sun May 25, 2014 6:03 am, edited 1 time in total.
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sun May 25, 2014 4:30 am

@Roccinio
plugin changelog 5/25/14
  • Fixed a bug that was recalculating the current frame even while paused nullifying the cpu savings while paused.
  • Removed a js array search bottleneck resulting in massive speed gains.
  • Added 'Set Automatic Pausing' action that allows you to set a padded border to the viewport. Animation playback will automatically pause and resume as it leaves and enters the padded viewport area to save cpu resources when objects are offscreen. The animation timer will continue to tick even while outside the viewport to give the appearance the animation was playing the whole time. The action also allows you to set sound playback to be excluded from automatic pausing.

Image

A few quick tests:
Objects all on screen animating:
Image


Objects all on screen paused:
Image


Objects sparsely populating a large area and automatically pausing off-screen
Image
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sun May 25, 2014 3:26 pm

You are the man!! 8-)
The second you exterminated the bottleneck i saw a huge performance gain!
As for the automatic pausing feature i just do not understand how to properly use it.
i do not understand the padding concept at all.
by adding numbers on the boxes we create an invisible square that if the scml object is within these boundaries it stops animating?
and if yes what happens if it patrols 2000 px left or right?
for now everything i try it just makes the scml animation invisible when the event kicks in
You do not have the required permissions to view the files attached to this post.
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Sun May 25, 2014 6:46 pm

@Roccinio
You just set the automatic pause settings once, when the object is created. Once you set the padding with a single action, then the plugin will continue to pause and unpause automatically, unless you use another action to stop automatic pausing.
The padding values decide how far outside the current viewport the object is before it pauses automatically.

Messing around with this should make it pretty clear:
AutoPause Demo

To use the demo:
  • Use arrow keys or click inside minimap to move the camera.
  • Red means paused. Green means playing.
  • Move the sliders to change the automatic pausing settings.
  • Moving the values into the negative puts them firmly into the viewport where it's easy to watch the behavior of the pausing in real time as you scroll through the layout.
Image
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: shinichild and 14 guests