I have some questions about effects...

Discussion and feedback on Construct 2

Post » Thu Jul 07, 2016 1:18 pm

I love construct 2 :D and now i'm using more effects and i have some questions.

What use more CPU and GPU:
- Change Sprite Color by Behaviour or change Sprite Color by WebGL Effect?
- Use WebGL effects on layer or use WebGL effects each instaces objecs.

Thank's for listening.
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Post » Thu Jul 07, 2016 1:28 pm

Are you developing for mobile or desktop?
Follow my progress on Twitter
or in this thread Archer Devlog
B
42
S
18
G
19
Posts: 1,060
Reputation: 14,054

Post » Thu Jul 07, 2016 1:31 pm

tunepunk wrote:Are you developing for mobile or desktop?


Both.
I'm using more in mobile, but my html5 games need to run in both on a web page.
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Post » Thu Jul 07, 2016 1:34 pm

Then i wouldn't recommend using WebGl effects. Cheapest possible way would probably be to just have duplicate sets of sprites, for a bit more memory use, or maybe try the blend modes?
Follow my progress on Twitter
or in this thread Archer Devlog
B
42
S
18
G
19
Posts: 1,060
Reputation: 14,054

Post » Thu Jul 07, 2016 1:41 pm

tunepunk wrote:Then i wouldn't recommend using WebGl effects. Cheapest possible way would probably be to just have duplicate sets of sprites, for a bit more memory use, or maybe try the blend modes?


Hum, i have 1 character with 8 animations.
I want to have 8 characters with different colors.
I have 3 ways:
1 - Change color by WebGL Effects;
2 - Change color with a behaviour plugin;
3 - Create 8 sprite on photoshop just changing color and create 8 animations to each others (the game will be heavy);

I don't know if i have more ways to change color.
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Post » Thu Jul 07, 2016 1:49 pm

Although I think option 3 you will get much better fps, but the game will use a bit more memory, and load a little bit slower. That's just my experience from working for mobile. I'm using option 3 at the moment, because the other solutions i lost too much FPS.

EDIT: but the best way is of course to try it. What's best for your game. Test and see how it performs.
Try all options and decide the one that you think get you better performance.
Follow my progress on Twitter
or in this thread Archer Devlog
B
42
S
18
G
19
Posts: 1,060
Reputation: 14,054

Post » Thu Jul 07, 2016 1:59 pm

tunepunk wrote:Although I think option 3 you will get much better fps, but the game will use a bit more memory, and load a little bit slower. That's just my experience from working for mobile. I'm using option 3 at the moment, because the other solutions i lost too much FPS.

EDIT: but the best way is of course to try it. What's best for your game. Test and see how it performs.
Try all options and decide the one that you think get you better performance.


Hum. Do you know if i use effect and behaviours to change color, the construct 2 still change color at run time in 60 fps?
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Post » Thu Jul 07, 2016 2:19 pm

You probably won't notice any major performance impact unless you have a LOT of stuff going on already.

You will need to create a miniature "stress-test" perhaps... so make like 1000 of your sprite objects at runtime using a loop (just for testing) and try the different effects to see which one works faster/slower.

You can make an FPS and CPU counter on your project as well to help see visually the difference. Just make a text box object and every tick set the text to;
"FPS: "&fps&"CPU LOAD: "&round(cpuutilisation * 100)

This will give you a nice FPS counter and a rough approximation of CPU load.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Thu Jul 07, 2016 3:24 pm

Answer your own performance questions with measurements

although I will add:
- there's no official behavior that can change the color of an object, I guess you're looking at a third-party addon?
- if you have a lot of objects and many overlap, applying the effect to the whole layer can be faster, since it only processes everything once. Otherwise overlapping areas are processed more than once. On the other hand if you only have one or two small objects, it would be a waste to apply the effect to the whole layer, since it will have to process a larger area than necessary.
Scirra Founder
B
403
S
238
G
89
Posts: 24,653
Reputation: 196,143

Post » Thu Jul 07, 2016 4:44 pm

SoldjahBoy wrote:You probably won't notice any major performance impact unless you have a LOT of stuff going on already.

You will need to create a miniature "stress-test" perhaps... so make like 1000 of your sprite objects at runtime using a loop (just for testing) and try the different effects to see which one works faster/slower.

You can make an FPS and CPU counter on your project as well to help see visually the difference. Just make a text box object and every tick set the text to;
"FPS: "&fps&"CPU LOAD: "&round(cpuutilisation * 100)

This will give you a nice FPS counter and a rough approximation of CPU load.

~Sol


Hey, thanks, i'm making some tests! :D
B
14
S
6
G
2
Posts: 81
Reputation: 2,241

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 8 guests