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

Discussion and feedback on Construct 2

Post » Sun Mar 30, 2014 5:09 pm

khanh wrote:I might have a clue about this:
C2 uses Google Closure Compiler to minify scripts, so the variables and properties (with dot syntax, ex: Object.property) you use will be changed after the minify process.

Hi khanh. Thanks for the pointer. In all of the official plugins like the sprite plugin, there is a lot of dot syntax. Is there only certain circumstances where it needs to be avoided?

EDIT:ok, someone just pointed me to this: https://www.scirra.com/manual/22/runtime-overview

Somehow missed the "Google Closure Compiler compatibility" section on the first read-through. I may be able to get to this sooner than I thought. Still a few things to do before I can give an ETA though.


akumaGouki wrote:I can't see my animations, I uploaded the construct project and the spriter folder

The C2 plugin requires that you save the scml and scon file with two save options set in Spriter. It appears you do not have them set. The settings will be saved, so you only have to set it once:
Image
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sun Mar 30, 2014 8:36 pm

lucid wrote:Hi khanh. Thanks for the pointer. In all of the official plugins like the sprite plugin, there is a lot of dot syntax. Is there only certain circumstances where it needs to be avoided?


I'm not sure how to explain this, though I can give you an example of a case where the dot syntax will cause the problem:
Without minifying, you can get an object type from runtime by doing this:
Code: Select all
Acts.prototype.ExampleAction = function() {
    var type = this.runtime.types.AnyObjectType; // AnyObjectType is the name of an object type created in C2
    console.log(type);
};

In this case, even if you use the bracket syntax (this.runtime.types["AnyObjectType"]), the code won't work after C2 minify the project, since AnyObjectType has also been renamed.

I can only say that if you access a property from an external library, you should go with the bracket syntax (although you should still be aware of the cases as in my example). The same applies if you want to expose something from your plugin.
B
4
Posts: 2
Reputation: 274

Post » Mon Mar 31, 2014 11:25 pm

Roccinio wrote:here is the first ever pic of my game ! :)
see what i mean about the rectangle and the scml animation?


Hi Roccinio,
The Spriter object has actions to rotate the Spriter object by or to any specific number of digrees. You'll need to do something like:

Is player block sprite overlapping slope tile, and is on the ground, then rotate the Spriter object to whatever angle is required.

You'll also likely need another event or action to change the position of the spriter object relative to the player block sprite depending on if the player is standing on a slope or not... something like:

If player is NOT on a slope, then set postion to action point zero of player block sprite.

If plater IS on a slope, then set postion to action point 2 (or x=0, y=30) of player block sprite.

Cheers,
Mike at BrashMonkey
B
46
S
8
G
4
Posts: 414
Reputation: 6,830

Post » Fri Apr 11, 2014 6:39 pm

I really LOVE the animation blending and the snap feature in timeline improves the work with spriter so much better now. Exellent work :D
B
43
S
9
G
5
Posts: 231
Reputation: 7,291

Post » Fri Apr 11, 2014 8:39 pm

uhh... is it normal that after exporting the project, the animation wont show up neather in html5 nor node webkit?

EDIT: ok nevermind, I figured now that I have to uncheck the minify script when exporting ^^;
B
43
S
9
G
5
Posts: 231
Reputation: 7,291

Post » Sat Apr 12, 2014 2:46 am

excellent miu3. I will be looking into the minify thing in the coming weeks.

EDIT:
Spriter B7 Released!
Official release announcement here
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Sat Apr 12, 2014 12:44 pm

AWESOME!!! Thanks for the new update, I'll be all over this:)
B
48
S
15
G
5
Posts: 183
Reputation: 8,476

Post » Sat Apr 12, 2014 5:09 pm

Yay! I've started using Spriter for real this month, and the improvements are really showing! Glad I paid this pre-kickstarter! :P
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

Post » Sat Apr 12, 2014 10:58 pm

any updates on char maps working in construct 2?
B
15
S
2
G
3
Posts: 50
Reputation: 1,863

Post » Sun Apr 13, 2014 12:37 pm

@lucid
I'm not if this is the best place to post a (possible) bug, but this seems related to the C2 plugin.

I just started importing some spriter animations in my project, and this file I'm attaching here has a problem:
Every loading procedure (drag-drop to c2, running the project, changing animation, etc) is ok, no errors at all, but the "background" image (the cat's face) doesn't appear on runtime. Its initial visibility is false.

Looking at the imported files on C2, I can see that every sprite has initial visibility set to "Invisible", but I can't understand why that particular image won't appear.

Do you have any idea why this is happening?
Please excuse me if I missed something in the process :)

Thanks!
You do not have the required permissions to view the files attached to this post.
B
107
S
40
G
10
Posts: 456
Reputation: 13,202

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 14 guests