{"assets":[{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen04_b-300x168.jpg","local":"\/data\/posts\/2013\/07\/20bc50060c7b1c589390d6acede9472f.jpg"},{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Layout-300x90.png","local":"\/data\/posts\/2013\/07\/b040fa97f34faa21ac053f88143c0461.png"}],"author_link":"author\/nusan\/","author_name":"NuSan","cat":"LD #25","categories":["LD #25","LD #26"],"comments":[],"epoch":1373772600,"event":"LD25","likes":8,"metadata":{"p_key":"79356","p_author":"NuSan","p_authorkey":"0","p_urlkey":"288366","p_title":"My two LD entries now working on Android","p_cat":"LD #25","p_event":"LD26","p_time":"1373772600","p_likes":"8","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1366934400","event_key":"16","event_name":"LD26"},"source_url":"2013\/07\/14\/my-two-ld-entries-now-working-on-android\/","text":"<p>My entries to LD25 (Under a bloody sky) and LD26 (Not Complex) now have touch support, and work properly on my Nexus 4 Android device.\u00a0Those two project use WebGL so few thing where realy necessary to make them working. For an unknown reason,, \u201cNot complex\u201d only work with firefox, not with chrome. It\u2019s the same with every THREE.JS samples i could test.<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-25\/?action=preview&amp;uid=18943\" target=\"_blank\" title=\"Under a bloody sky\">http:\/\/www.ludumdare.com\/compo\/ludum-dare-25\/?action=preview&amp;uid=18943<\/a><\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/2013\/07\/14\/my-two-ld-entries-now-working-on-android\/screen04_b\/\" rel=\"attachment wp-att-262318\"><img alt=\"Screen04_b\" class=\"alignnone size-medium wp-image-262318\" height=\"168\" sizes=\"(max-width: 300px) 100vw, 300px\" src=\"\/data\/posts\/2013\/07\/20bc50060c7b1c589390d6acede9472f.jpg\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen04_b-300x168.jpg 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen04_b-550x309.jpg 550w\" width=\"300\"\/><\/a><\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-26\/?action=preview&amp;uid=18943\" target=\"_blank\" title=\"Not complex\">http:\/\/www.ludumdare.com\/compo\/ludum-dare-26\/?action=preview&amp;uid=18943<\/a><\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/2013\/07\/14\/my-two-ld-entries-now-working-on-android\/screen_01-6\/\" rel=\"attachment wp-att-262317\"><img alt=\"Screen_01\" class=\"alignnone size-medium wp-image-262317\" height=\"184\" sizes=\"(max-width: 300px) 100vw, 300px\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen_01-300x184.jpg\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen_01-300x184.jpg 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen_01-550x338.jpg 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/07\/Screen_01.jpg 1024w\" width=\"300\"\/><\/a><\/p>\n<p>\u201cUnder a bloody sky\u201d use the framework PlayCanvas, and was very very simple to port. In fact, nothing needed changes except adding touch control. It work on Firefox beta and Chrome on my Nexus 4. The layout is prety simple, with only one touch event supported, dragging horizontaly will rotate the camera, and if you are above half the screen, you will go forward, and below 1\/4 you will go backward.<\/p>\n<p>\u201cNot complex\u201d was, well, not so simple to port. First, chrome doesnt seem to handle THREE.JS webgl, and some graphics bugs were visible in Firefox (changing an alpha value from 0 to 1 magicaly fixed it) and the control are a lot more complex. I also needed to attach keyboard event receiver to document, and touch event to the welGL canvas to make it work properly.<\/p>\n<p>The controls use two distinct hidden zone. When the mobile is vertical, it\u2019s the top and bottom, while horizontal use left and right, so you can put your left thumb and your right index. Draging on the bottom\/left zone will make the character start moving in the specified direction, and tapping will make the character jump. The top\/right zone make camera rotate by dragging, and tapping will make the character punching. The control are a little bit slugish for now, mainly with the jump, and it realy need a GUI to be user friendly.<\/p>\n<p>Here is a small abstract of the layout for \u201cUnder a bloody sky\u201d and \u201cNot complex\u201d horizontal and vertical.<\/p>\n<p><a href=\"http:\/\/www.ludumdare.com\/compo\/2013\/07\/14\/my-two-ld-entries-now-working-on-android\/layout\/\" rel=\"attachment wp-att-262320\"><img alt=\"Layout\" height=\"123\" src=\"\/data\/posts\/2013\/07\/b040fa97f34faa21ac053f88143c0461.png\" width=\"411\"\/><\/a><\/p>\n<p>If you have any advice or tips about touch handle and layout, it\u2019s realy wellcome.<\/p>\n<p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/android\/\" rel=\"tag\">android<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/webgl\/\" rel=\"tag\">webgl<\/a><\/p>","time":"July 14th, 2013 3:30 am","title":"My two LD entries now working on Android","title_was_empty":false}