Flappy bird running slow

314 views
Skip to first unread message

subhash bhatt

unread,
May 11, 2016, 5:48:42 AM5/11/16
to MIT App Inventor Forum
I have created a game like flappy bird....it is runing fine on an emulator but running very slow on real android device(s2,s6)
In the game i have used clocks with timers 10,20,30,40.
If i set clocks to  time aboe 100 i guess the game will not run smoothly...........is there a problem with clocks..........or what
how is the game running smooth on emulator and not on samsung device...i am using droid4x emulator...............please help

ScottFerguson

unread,
May 11, 2016, 10:30:32 AM5/11/16
to mitappinv...@googlegroups.com
Some devices will not keep up if the clock Interval is set to less than 100 ms.
So compared to javascript and it's canvas at 60 frames per second the MITAI animations will run at 10 frames per second.
This results in jumpy movement and I know of no fix for this.
I believe if you use 100 ms the movements will be more similar between the emulator and the devices.
But, of course, that is not much help when you want smooth animation.

subhash bhatt

unread,
May 16, 2016, 2:09:19 PM5/16/16
to MIT App Inventor Forum
i dont see how fps is affecting this,since it is running fine on emulator...................how did you come to know that mit app inventor runs at 10 fps................if it is so, looks like i have wasted several weeks..........i guess the code generated is working slow........ is there anyway to view its source code?

ScottFerguson

unread,
May 16, 2016, 6:15:38 PM5/16/16
to MIT App Inventor Forum
I found that the speed of sprites in a test project were similar when the interval was set to 100 ms. Of the two devices that I have, one contains a dual-core processor and the other a quad core processor.
Setting the Interval to a lower value caused the dual-core device to lag.


Italo

unread,
May 16, 2016, 6:29:04 PM5/16/16
to MIT App Inventor Forum
App Inventor is not a professional game design platform. It's an educational tool to help people understand the concepts of programming. It meets and exceeds its purpose.
There's a lot of things that can be done in App Inventor in a semi professional way, but advanced programming like a fast game, are not really what the developers have in mind when making App Inventor.
I also felt frustrated when I reached the limits of what I can do with graphics, but then somebody in this forum explained this same thing to me.
If you are really into game developing, you should try learning more advanced platforms, like Unity, Gideros Mobile or Android Studio, for example.

ScottFerguson

unread,
May 16, 2016, 9:55:10 PM5/16/16
to mitappinv...@googlegroups.com
You could continue to use MITAI if you would be willing to develop games for the WebViewer using html and javascript.
That would get around the slow processor lag issue.
You would have to option of using one of the many game animation javascript libraries.
But coding javascript is not my idea of fun.
Reply all
Reply to author
Forward
0 new messages