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

Discussion and feedback on Construct 2

Post » Tue Mar 25, 2014 3:27 am

@Brashmonkey
@lucid
To which ever is making the Spriter Plugin for C2. I have a request based on technical review over C2 and Open/WebGL.

I am asking that the entire image object structure be done. After having read recently to Ashley's statement in gagillion zillion download thread. Ashley mentioned that each game object even if using the same visual image is in fact a different image and will result in an additional draw call in WebGL.

After having done some research I can confirm that the more Objects in the game the more heavier the OpenGL drawing system is tasked in regards to the draw call. Having done some tests I found out that preview C2 tests is that preview never uses an image atlas. I also found that an exported game will use an image atlas. This results that with carefull design that our games can have better performance when exporter.

Why is this important. because on mobile devices we have very limited number of Draw calls to use. The iPhone should limit to 25apx, iPad 100, of course newer devices probably 150 to 200 and PC I can imagine around 500 or so. But this isn't a request for PC's.

Complicated Spriter entities can use many different parts. To show that the Basic_Platformer_object has 45 Objects. This means that alone with no other objects on the screen that spriter object is going to use 45 draw calls in Preview and Export.

If i'm target a mobile device where I have say about 100 draw calls that Spriter object is going to use almost half my entire draw limit if I want to maintain GPU performance.

If Spriter Plugin could instead use 1 Sprite Object, but instance itself, use frames and animations for the graphics then we could get a Spriter object to reduce the number of draw calls. Of course there is still layering and all of that, but this would offer a much needed performance assistance for mobile devices in C2 games.
B
87
S
18
G
9
Posts: 2,455
Reputation: 14,834

Post » Tue Mar 25, 2014 10:11 am

@Everyone :

I am newbie , I have a test of spriter and a capx of construct 2. But when preview I dont see anything. What did I do wrong ?
In test, I dont have any bone for sure.
If you have a tuttorial for that , pls show me how to use spriter and import it in construct without error. Thank you for it.

Sorry , my english not well :"(
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 5
Reputation: 183

Post » Tue Mar 25, 2014 6:34 pm

another question! :)
i am using scml files for my pick ups as well (coins,power ups etc).
my game is starting to slow down the more coins i add(100+). the question is ,are spriter files "treated" the same way as normal sprites meaning when they are off screen they are not drawn or the computer has to calculate them even if they are off screen and thus the slowdown?
what is the best way to use scml files performance wise ?
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Wed Mar 26, 2014 12:06 am

silverpro89 wrote:@Everyone :

I am newbie , I have a test of spriter and a capx of construct 2. But when preview I dont see anything. What did I do wrong ?
In test, I dont have any bone for sure.
If you have a tuttorial for that , pls show me how to use spriter and import it in construct without error. Thank you for it.

Sorry , my english not well :"(


Did you watch the tutorials in the tutorial section here?
https://www.scirra.com/tutorials/827/reimporting-or-updating-a-spriter-file-in-your-construct2-project

1) You must save out both a scml and scon of the same name from Spriter into the same Spriter project folder.
2) both "other file actions/custom save options" options are both turned ON. before you save your scon and scml file from Spriter.
3) Drag in only the .scml file into the canvas in C2 and the .scon should be imported as well automatically.
4) Watch the videos carefully and copy what I do. If that fails, email me at mike AT brashmonkey.com and I'll try to help further.

cheers,
Mike at BrashMonkey
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Wed Mar 26, 2014 12:11 am

@brashmonkey

Hello Brashmonkey,

any chance we can get a flash behaviour for spriter animations like the one which is already implemented in construct 2? Its a neat effect to make a characters flash after they took damage.

Thank you
Free Android game: https://play.google.com/store/apps/deta ... VSMrMonkey

"Seven Birds VS Mr. Monkey" is a simple yet fun game.

Mr. Monkey is being attacked by birds and without a way to escape all hope seems lost. But if you think Mr. Monkey goes down that easily you are mistaken!

Help Mr. Monkey to upgrade his skills, get special attacks and show these birds who's the boss!
B
9
S
1
G
1
Posts: 51
Reputation: 755

Post » Wed Mar 26, 2014 12:13 am

Roccinio wrote:another question! :)
i am using scml files for my pick ups as well (coins,power ups etc).
my game is starting to slow down the more coins i add(100+). the question is ,are spriter files "treated" the same way as normal sprites meaning when they are off screen they are not drawn or the computer has to calculate them even if they are off screen and thus the slowdown?
what is the best way to use scml files performance wise ?


No matter how optimized spriter playback (or any modular/bone animation system) becomes, I'd always opt to "bake out" animations of small items like coins(...especially where there could be hundreds in the level or on-screen...) To sequential png images and then just use normal C2 Sprites for those objects. Its not the sprite drawing that will kill your frame rate, think of all the tweening math going on, per sprite, per bone, per object.

That asside, Like I mentioned in a previous post somewhere, we do have plans for some very nice tricks/features on the spriter side to help game makers have more choices and optimizations per animated object on the screen...but that will almost surely not happen until after the initial release of Spriter Pro 1.0

cheers,
Mike at BrashMonkey
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

Post » Wed Mar 26, 2014 12:21 am

@brashmonkey
thank you for your invaluable info.
do you have any advice for the slope angle as well? what would you do on situation like that?
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Wed Mar 26, 2014 12:24 am

@allchix
if you use fade behavior on your scml spriter character it works so i guess flash behavior would work as well.
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Thu Mar 27, 2014 3:48 am

Roccinio wrote:@brashmonkey
thank you for your invaluable info.
do you have any advice for the slope angle as well? what would you do on situation like that?


I bind all my spriter characters to a collision rectangle. Make a separate sprite that is always invisible. You control this sprite. Your spriter character is pinned to it.

This gives you full benefit of using spriter, but also better collision control.

-------------
Join me as I develop Live! : http://steamcommunity.com/groups/Inde_Game_Dev
B
23
S
7
Posts: 211
Reputation: 2,105

Post » Thu Mar 27, 2014 7:52 am

@Roccinio, Tylermon is right. Eventually you'll be able to designate a universal bounding box for Spriter objects right within Spriter...but until then the best way is definately to control a nice clean C2 rectangluar sprite and pin the spriter object to it, either with the pin behavior or with an event.

cheers,
Mike at BrashMonkey
B
45
S
8
G
4
Posts: 414
Reputation: 6,805

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: KaMiZoTo, Yahoo [Bot] and 15 guests