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

Discussion and feedback on Construct 2

Post » Mon Apr 21, 2014 7:26 pm

@jayderyu

My bug report was not mentioning pinning, but rather setting position to another object every tick, or setting position to a particular X, Y every tick. I just mentioned that I tested pinning as well as an alternative test.
Do you mean that the pinning behavior does exactly a "set position to x,y" every tick as well?

Edit: @jayderyu but i'm interested to know why you think this would not be a bug report: I mean, if you pin an animation to another sprite object, then there will be no delay at all from what we can observe, it's just that the scml object has currently some important delays on the Y axis, compared to any other type of object that doesn't have such a delay problem.
B
15
S
4
G
3
Posts: 52
Reputation: 3,552

Post » Mon Apr 21, 2014 10:39 pm

Pin or not the logical order of objects updates determines the reaction of SetPosition.

So let's break down what is happening.

scml.setPosition( ply.x, ply.y )
ply.setPosition(newx, newy)

so what happens here?
the first object updates the position to the current player position. Then the player is updated. This leaves the scml(or any other object) 1 tick update behind. Is this a bug? no it's an architecture design issue. The solution.

ply.setPosition(newx, newy)
scml.setPosition( ply.x, ply.y )

ok ok, but of course there is a problem. I'm aware of it too. The player is likely to be using a behaviour like Platformer. Which means we can't actually control the order of position. And as a >>>hunch<<< it goes like this.

EventSheet
Behaviours

And of course we can't actually control that order :( So instead try

wait0
scml.setPosition( ply.x, ply.y )

So is it a bug or is the result of design architecture. How can we create a fundamental change mixing plugins and ES code? The best we could get is the toggle ES/Behaviours order. But that won't fix the problems for PIN. How do we order which behaviours go last in the order structure? This is kinda the thing that just has to be. We get a massive awesome tool, but we need to accept the design architecture.

If Ashley decides to put the actions of PIN after all other updates. Then that breaks up the speed flow. As the object updates, other objects update, then goes back to PIN objects. This would reduce performance as this increases object loop update size.

Your noticing this on the SCML. I've seen it on a lot more. It really depends on some other form of object ordering. For now try the Wait 0 and see if that fixes up the problem. However it's still not an SCML issue.

And just assist you a topic made two years ago.
viewtopic.php?f=152&t=67260&p=572493&hilit=pin+delay#p572493
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Apr 22, 2014 9:15 pm

plugin changelog 4/22/14
  • Fixed a bug that prevented the plugin from working when exported for Wii-U
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Apr 22, 2014 10:54 pm

About that lag issue on every tick, well in my project I build a way to Set Animation action ever tick below the main every tick that set the position of the player.
https://www.dropbox.com/s/8nhrxd39el5zcnv/sample.png

Here I have 2 vars: animationSet (With the name of the animation) and animationType (A number to chose from the animation possibilities)

With this, there is no lag at all.
But in case of this been actually a bug from the .scml/.scon file, I will implement the normal way of set animations anyway and let deactivate.

I hope I could help, sorry for no .capx file, just took the picture from my project.

So basic, If you set the animation every tick below the main every tick where you set the position of the .scml/.scon to the rectangle, will be no lag.
Last edited by Ronei Alves on Thu Apr 24, 2014 1:28 am, edited 1 time in total.
B
13
S
6
Posts: 15
Reputation: 1,329

Post » Wed Apr 23, 2014 2:25 am

Ronei Alves wrote:About that lag issue on every tick, well in my project I build an way to Set Animation action ever tick below the main every tick that set the position of the player.
https://www.dropbox.com/s/8nhrxd39el5zcnv/sample.png

Here I have 2 vars: animationSet (With the name of the animation) and animationType (A number to chose from the animation possibilities)

With this, there is no lag at all.
But in case of this been actually a bug from the .scml/.scon file, I will implement the normal way of set animations anyway and let deactivate.

I hope I could help, sorry for no .capx file, just took the picture from my project.

So basic, If you set the animation every tick below the main every tick where you set the position of the .scml/.scon to the rectangle, will be no lag.


Thanks for sharing!
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
71
S
19
G
19
Posts: 1,919
Reputation: 16,910

Post » Wed Apr 23, 2014 2:40 am

I was looking a .capx of spriter for many months.

We did not have an example .capx, need to know how to implement it.
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Wed Apr 23, 2014 3:21 pm

Joannesalfa wrote:I was looking a .capx of spriter for many months.

We did not have an example .capx, need to know how to implement it.


I will try to make one today, but I am need to make a Spriter animation first, a really simple one, then I post the .capx file here.
B
13
S
6
Posts: 15
Reputation: 1,329

Post » Wed Apr 23, 2014 4:53 pm

Ronei Alves wrote:
Joannesalfa wrote:I was looking a .capx of spriter for many months.

We did not have an example .capx, need to know how to implement it.


I will try to make one today, but I am need to make a Spriter animation first, a really simple one, then I post the .capx file here.


And here it is the .capx file: https://www.dropbox.com/s/ygnth1vy0fjl3 ... ample.capx

I think it will be more easy to see the lag with your own animation, so just replace the scml file.

The animation I used only have 2 Bones.
B
13
S
6
Posts: 15
Reputation: 1,329

Post » Wed Apr 23, 2014 5:28 pm

Ronei Alves wrote:About that lag issue on every tick, well in my project I build an way to Set Animation action ever tick below the main every tick that set the position of the player.
https://www.dropbox.com/s/8nhrxd39el5zcnv/sample.png

...

So basic, If you set the animation every tick below the main every tick where you set the position of the .scml/.scon to the rectangle, will be no lag.

Thanks, I will try your method ;)
B
44
S
15
G
6
Posts: 481
Reputation: 6,967

Post » Wed Apr 23, 2014 9:41 pm

@Brashmonkey - @lucid - I still get these IID errors with certain spriter objects. In this case, after the error, many of the background objects disappeared.

Image
Image
B
20
S
4
Posts: 382
Reputation: 2,874

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests