Appmobi

Discussion and feedback on Construct 2

Post » Sat Jan 14, 2012 7:42 pm

I've already looked in to DirectCanvas (the thing which speeds up HTML5 games), but coding for it is a nightmare. For some reason it isn't backwards compatible with existing code. Using it means a lot of work, possibly changing all rendering code, and it looks likely it'll break any third party plugins that draw. It's not enabled by default so using AppMobi right now doesn't get you any extra performance over PhoneGap. I tried to get them to explain why they did it like that but they just said it was the only possible way. It certainly doesn't have to be done like that on Android, so I'm not sure what's going on. Overall I was pretty disappointed, so we've been looking in to alternatives, but the state of mobile is tricky to say the least.

It's possible some hacks may get better performance, but I was going to focus on Android 4 when it comes to my phone (due this month). Also, I think mobile performance is a problem time will fix, since I'm sure hardware-accelerated canvases and WebGL are on their way for mobiles and tablets - they're just a little behind the desktop tech. Being a small team we can't really afford to spend ages on hacks that might not work, but I think porting DirectCanvas to a PhoneGap plugin would be an interesting place to explore next.

I tried a little side-project recently called WebGLGap which was a PhoneGap plugin that aimed to enable WebGL for Android. It worked, but was slower than Canvas 2D! I think it's Android's javascript engine is terribly slow at the moment and negates the performance benefit! So I hope that shows we're aware of the performance issue, and we are trying things, but it's a very difficult area - there are no easy fixes, it looks like all of the options will involve lots of work.Ashley2012-01-14 19:44:42
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Sat Jan 14, 2012 8:06 pm

Drat. Oh well, thanks for the info.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Sat Jan 14, 2012 8:27 pm

Ashley, yes that is disappointing. Android 4 will only be available for just a few preexisting Android phones. My phone Galaxy S is one of millions of phones that they are still selling not on the list even though the phones processor is fully capable of handling it. So much for open source, thank you Google.

Your WebGLGap does indeed look promising. Thanks for making it open source.

Idk, maybe I will just focus on what works for now, and just stay away from the mobile market. The way things look the millions of phones like mine will allow flash to have a long slow death. I just don't want to have to recreate my C2 games in Action Script.
B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Sat Jan 14, 2012 9:17 pm

HTML5 is supposed to be taking over AS3 and flash. Thats why i moved to C2 i was a flash developer And as much as i love flash, its old technology it can't live for ever.
B
29
S
12
G
7
Posts: 740
Reputation: 7,839

Post » Mon Jan 16, 2012 1:47 pm

Ashley is right. At this point appMobi's Direct Canvas doesn't support commands that use the DOM. It was designed for games that are built completely within the <canvas> tag. It simply won't work with C2 games at this point.
B
2
G
1
Posts: 4
Reputation: 458

Post » Mon Jan 16, 2012 6:14 pm

@profMobi - Ah well. Thanks for the response!
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Mon Jan 16, 2012 10:22 pm

@profMobi - not sure what you mean because Construct 2 games are built completely with the <canvas> tag. I was referring to the fact all DirectCanvas calls have to be made in a separate javascript context and communicated with using strings and eval(). This is a big spanner in the works for our engine since we have render code spread out over a bunch of plugins (including third party ones we don't control) that looks like it all needs changing. Further, Image objects can't be stringified so we'd have to hack all our loader code, and the Images are needed in both contexts so it might end up doubling memory usage which is especially bad for low-memory devices like phones. Finally, stringify and eval() smells kinda hacky! eval() is gonna do javascript syntax parsing on every call which makes it slower than it could be.

I'm kind of exasperated because we'd love to use it and get the performance gains, but the whole second-context thing makes it a nightmare, and we're working round the clock as it is. Why don't you guys just design it all to work from one context?!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Mon Jan 16, 2012 10:37 pm

Downloaded appmobi last night as I'm frustrated with phonegap not being able to run sound. Tonight I used it to package up my game for Android and it works well - with sound!!!! Takes maybe 3-5 seconds longer than the phonegap apk to initiate on my Galaxy S2, but once it's up and running it seems to work a bit better. Phonegap wasn't registering some of my touches every now and again if a level had a lot of events; appmobi seems to be picking up all touch inputs.
B
31
S
11
G
7
Posts: 197
Reputation: 6,682

Post » Tue Jan 17, 2012 2:31 am

I recently subscribed to the Appmobi news letter.

Got this today....not sure if its relevant to this topic, but I am posting it.
-------------------------------------------------------

jQ.Mobi: At Last, jQuery Rewritten,
Ground-Up, for iOS and Android

New community project is optimized for HTML5 mobile, provides
stellar performance in a tiny footprint

SAN FRANCISCO - January 16, 2012 - jQ.Mobi (www.jqmobi.com), a new open source mobile development framework makes its public debut today. jQ.Mobi is a mobile-optimized, HTML5 rewrite of the ubiquitous jQuery framework which is used on over 50% of all desktop websites.   jQ.Mobi provides stunning speed improvement (2.5X faster than desktop jQuery), size reduction (only 3K vs. 36K) and code efficiency, with a particular focus on delivering an identically high quality user experience to both iOS and Android devices. Mobile developers can join the community and download the code at www.jqmobi.com.

JavaScript frameworks like jQ.Mobi provide common user interface and programming functions, reducing development effort and time. jQ.Mobi includes a query selector engine, a user interface (UI) library, and a collection of plugins. On mobile devices, existing JavaScript UI frameworks like jQuery Mobile, JQTouch and Sencha Touch are all hampered by their roots in desktop Web browsers and HTML 4. Under these legacy UI frameworks, the user experience on Android-based smartphones is particularly poor.   Android devices now represent nearly 50% of the world smartphone market.

"It's great to finally see a lightweight JS library specifically tailored for smartphone performance and inspired by the popular APIs that made jQuery famous," said Paul Bakaus, Zynga Germany CTO and creator of jQuery UI. "To me, this is the hopeful prediction of the future of jQuery 2.0, today."

jQ.Mobi was contributed to the open mobile Web community by the developers at appMobi.

"With jQ.Mobi we've given the mobile development world an HTML5-ready jQuery," said Sam Abadir, appMobi CTO and founder. "The truth is, the single biggest issue facing mobile HTML5 developers is the lack of good user interfaces. There is nothing more critical to the success of mobile HTML5 in general. Apple set the bar high with its Cocoa Touch mobile interface and until now, similar quality UX tools haven't existed for Web-based mobile developers, and that is why we've put this project into play. We've started this project with high expectations, focused around delivering speed, size advantages, and cross platform uniformity, and we look forward to seeing where the open source development community takes it from here."

Speed
jQ.Mobi outperforms jQuery by 3X on Android and 2.2X on iOs.The JSPERF.COM test suite enables comparison of raw engine performance by testing the three most common functions: single query selector, create element and append element.

Tests were performed on various Android and iOS versions revealing that jQ.Mobi outperforms jQuery by 292% on Android and 223% on iOS. Improvement over Zepto was 5.5X on Android and 4X on iOs. Complete details of the tests and results can be viewed at www.jqmobi.com.

Size
The jQ.Mobi engine weighs only 3741 bytes, just 1/10th of jQuery, and less than half of Zepto. Code size is important for user interactivity in mobile because heavier pages take longer to load and to initialize. The full jQ.Mobi library with UI code is also tiny, at just 15K gZipped. By comparison, jQuery Mobile is 62K, and Sencha Touch weighs in at 99K
.    
Cross Platform Uniformity
jQ.Mobi was designed and tested specifically to provide identical experiences to users on both dominant smartphone platforms. Android has been a particular point of failure for desktop frameworks. A short video contrasting common UI functions on both platforms using each of the frameworks is available at www.jqmobi.com.

jQ.Mobi is offered free of charge as an open source asset under the MIT X11 license, starting with a short private beta testing period which begins today. appMobi encourages interested developers to stay up to date with jQ.Mobi development by joining the email list at www.jqmobi.com. The development of jQ.Mobi and maintenance of the JQMOBI.COM site are sponsored by appMobi.

A bold proponent of the open Web, appMobi's development tools and cloud-based services build on HTML5, CSS and JavaScript, creating a unified, open ecosystem that competes favorably with "walled gardens" offered by Apple and Google. In 2011, the company released several of its core technologies as open source, including its cross platform mobile device API, mobiUs Web browser, and directCanvas HTML5 game acceleration. In December, appMobi was named "Most Promising Tech Company for 2012" by ReadWriteWeb. appMobi's technology allows mobile app developers to support HTML5 and native app platforms with just one code base, and to deploy and service their apps on multiple platforms, including the open Web. For more information visit http://www.appmobi.com.

appMobi is a registered trademark of appMobi Inc. iOS and related marks, images and symbols are the exclusive properties and trademarks of Apple Computer Corp. All other trademarks and trade names are the property of their respective owners including: Amazon, Adobe, Flash, Android, Google, Sencha.chrisbrobs2012-01-17 02:31:54
B
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

Post » Tue Jan 17, 2012 1:50 pm

@chrisbrobs - jQuery isn't used much in the runtime, it's just used for the odd utility function, so jQ.Mobi doesn't look relevant to us.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: DankP3, NetOne, Zonacas and 4 guests