Animations in exported html5 website vs preview

Discussion and feedback on Construct 2

Post » Wed Oct 30, 2013 8:35 pm

Hi all,

I'm working on the beginnings of an html5 ipad game and am seeing what I would consider to be odd animation performance.

In "preview mode", the animations appear smooth and fast, but the same animations exported to an "HTML5 Website" seem slower and somewhat chunky. This seems counter intuitive to me based on what I read here: https://www.scirra.com/tutorials/577/construct-2s-export-time-optimisations (I would expect exported animations to be running "better").

From reading the forums and manual, I realize there's lots that could be done in terms of optimizing the images/animation themselves.

But, is there a reason that animations would actually perform worse in an exported website, but perform smoothly in a preview?

Thanks!
B
5
Posts: 11
Reputation: 272

Post » Thu Oct 31, 2013 7:36 am

Yeah i had some of these issues too.

In browser, try and zoom in and out if you have not applied the dt things ... (delta time)   its nutss .. but there is a solution.

Its quite simple to appply:

say you have some that moves 5 pixels every time:

Slef.X + 5     something like that,   you simply add Self.X + 5 * 60 * dt



Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,562

Post » Thu Oct 31, 2013 3:23 pm

Thanks - I'm not sure I understand how I would make delta time work with animations. What you described seems to apply to movement. Any tips?

Here's a capx that shows what I'm talking about - https://www.dropbox.com/s/rsgjs9v026kysrj/animationPerformanceTest.capx.

Steps to re-create:

1) Preview the capx on a 3rd generation ipad (http://support.apple.com/kb/HT5452#ipad_3rd_gen. An animation will run at the beginning of the layout and run fast and smooth.

2) Export the the capx to an "HTML5 Website", put on a web server and open it on the same ipad. The animation is noticeably laggy/chunky.

Any ideas?

Thanks,
-Scott
B
5
Posts: 11
Reputation: 272


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests