Posts

Showing posts with the label cocos2d

Best tools for making mobile applications

I tried to make a compass application for android using phonegap to check how far can I go with it. Phonegap is very powerful tool for making a mobile app that interacts with some site's API (eg. a twitter app) or that got usual interface and controls (forms, todo list, notes ..etc). Let's try push phonegap to its limits trying to make a game or some graphical tool that's I choose a compass app. I used a combination of CSS3 transform (to rotate the needle) and CSS3 transitions (to make rotation smooth), the code looks like this. d=360.0-heading.magneticHeading; // needle is the dom element for the needle image needle.style.webkitTransform='rotate('+d+'deg)'; It worked perfectly with two exceptions, we need to "normalize" the angle to force it taking the shortest path. The screen flickers when changing orientation, this can be fixed by forcing the app into one orientation only (either portrait or landscape), this is normal for games and al...