fps goes down on auto mirror/flip

Discussion and feedback on Construct 2

Post » Wed Aug 24, 2011 6:53 pm

when the action of auto mirror/flip executes the fps slows to 1/5 and sometimes the sprite dissapears

And without it runs fine at 59fps.

Is that common? Related to sprite size?
B
3
G
1
Posts: 33
Reputation: 541

Post » Wed Aug 24, 2011 7:45 pm

How often are you flipping it?
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Wed Aug 24, 2011 8:01 pm

Every arrow key press (Left or Right - Changes the angle of character).
B
3
G
1
Posts: 33
Reputation: 541

Post » Thu Aug 25, 2011 12:55 am

Is it a continuous FPS drop or a one-off? Can you post an example? It seems to work fine for me.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Thu Aug 25, 2011 3:52 am

in platform mode i wanted to fix the problem with the player sprite mirrored in animation frame 2, and switch with the keys.

but the mirror tool inside "edit image" doesnt work at all, it cuts the image in the center. also the other tools like resize or flip dont really do the things they should.

hope u can help me workaround this problem.
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Thu Aug 25, 2011 5:01 am

found the issue cause, its related to the resolution of the image i imported.

Images with to high resolution (like 1000 x 700) imported into sprite editor and resized inside the game layout cause this fps drops.

Depending the resolution it freezes the game for a time (fps 0-1) and after it unfreezes it works without any delay, including changing to left/right.

Also if you change the Browser tab when the game is freezed and go back, the object will be duplicated (including texts)

http://www.mediafire.com/?axuaacakaddeam4
B
3
G
1
Posts: 33
Reputation: 541

Post » Thu Aug 25, 2011 1:19 pm

The first time the character flips it mirrors the texture on-the-spot, which can cause a temporary pause if the image is large.

You should not have such a large image though! Your game will perform a lot better - and download a lot faster - if you resize the large image to be small outside of C2, then import the small image. You should not design games to use such large images! If it performs badly with large images, there's nothing we can do. You're giving the browser too much work to do. You just have to use smaller images.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Thu Aug 25, 2011 8:55 pm

so what about the ability to use frames as states for mirroring? isn't that idea a lot better, also because of performance?

when can i asume to be able to use the tool in the sprite import window correctly? or do i need to workaround with mirroring in events for longer time?
B
15
S
3
G
5
Posts: 396
Reputation: 4,977

Post » Thu Aug 25, 2011 9:10 pm

thanks again
B
3
G
1
Posts: 33
Reputation: 541

Post » Thu Aug 25, 2011 9:22 pm

[QUOTE=xeed]so what about the ability to use frames as states for mirroring?[/quote]
You can if you like - it's just boring importing the same frames and mirroring them, and then you have twice as many animation frames that have to be downloaded. The auto-mirror is mainly to save on download size, really (and for convenience).

[quote]when can i asume to be able to use the tool in the sprite import window correctly?[/QUOTE]
Sorry, I'm not sure I understand what you mean. Is something not working?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests