Surprisingly this is the only free on screen joystick I was able to find online that wasn't part of some other game engine. It's fairly straight forward and easy to implement.
The movement calculations were a little complex and didn't work for me, so I replaced them with this in the GameControls class:
//get the angle
//double angle = Math.atan2(_touchingPoint.y - inity,_touchingPoint.x - initx)/(Math.PI/180);
float xSpeed = _touchingPoint.x - initx;
float ySpeed = _touchingPoint.y - inity;
xSpeed *= 0.5;
ySpeed *= 0.5;
_pointerPosition.x += xSpeed;
_pointerPosition.y += ySpeed;
// Move the beetle in proportion to how far
// the joystick is dragged from its center
//_pointerPosition.y += Math.sin(angle*(Math.PI/180))*(_touchingPoint.x/70);
//_pointerPosition.x += Math.cos(angle*(Math.PI/180))*(_touchingPoint.x/70);
UPDATE: I am now using this for a dual joystick implementation. See my post on developing with multitouch in Android.
Here's the download and original forum post: http://trostalex.wordpress.com/2010/07/26/on-screen-joystick-source/
Sunday, August 29, 2010
Tuesday, August 17, 2010
Adw.launcher is sick
After experiencing the slow homescreen loading issues with 2.2, I decided to try out a couple custom launcher apps: launcher pro and adw.launcher.
Launcher pro is pretty handy in its own right, the only knock is that it only has 3 screens. On the other hand, the dock is extremely customizable. You can load and use your own images.
I chose adw because of the 5 homescreens, customizable dock, and smooth interface . I have not experienced any of the slow loading issues I had with the default homescreen on my droid. Definately a keeper, oh and its free.
Launcher pro is pretty handy in its own right, the only knock is that it only has 3 screens. On the other hand, the dock is extremely customizable. You can load and use your own images.
I chose adw because of the 5 homescreens, customizable dock, and smooth interface . I have not experienced any of the slow loading issues I had with the default homescreen on my droid. Definately a keeper, oh and its free.
Htc incredible low on memory, storage
A lot of people have been reporting memory issues with their htc droid incredibles. The phone is running slow, throwing errors left and right, and the battery lasts maybe two hours.
I believe this is due to the recent Facebook update for android, and the htc people application that comes with the sense ui. What happens is the facebook application tries to sync all of your contact info from facebook, even when your phone is supposed to be sleeping. Then something gets messed up in the people app, which holds your contacts, and an exorbant amount of memory is used up. To the point that you're phone can barely function.
The solution to this is to delete or opt out of sync with your facebook profile. Then delete your bloated contacts application. As I learned the hard way, make sure your contacts have been synched with google before deleting. They may not have even though you thought sync was turned on. A hard reset is not necessary as some have mentioned.
I asked the Verizon Rep about this when we went to the store to transfer contacts from an old phone back on to the incredible. He said he hadn't heard of the issue. Somehow I got the feeling I wasn't the first person he had told that to.
Blogaway
If this posts, then blogsway is a decent blogging app
Update: Its decent, not great. Force Closes when trying to edit...
Update: latest update through the market fixed fc when editing posts.
You can also edit blogger posts on your mobile browser by using the edit HTML tab. Don't be scared off if you've never used HTML before, the editor works almost the same as the default. Just type like you normally would.
Best Android Apps
Here are a few of the Android apps that I use on my droid:
Apps
NFL mobile (Verizon only) - Watch what is currently on NFL network live! Free!
Terminal Emulator (Root Users) - Good free terminal for entering commands
Pandora - Streaming radio based on your favorites
Overclock widget (Root)- allows you to set your CPU based on whether your phone is awake or asleep
Tesla LED - mototorch replacement that works with 2.2
Handcent SMS - Unleashes all of the options you could dream up for texting.
Wireless Tether (root) - share your 3g connection with wifi devices
ADW Launcher - Homescreen replacement that gets rid of the laggy 2.2 homescreen that is slow loading icons sometimes. Also allows for 4 items on dock, and 5 homescreens.
Games
iCommando - decent sniping game
Hockey Nations 2010 - Overpriced hockey game, but you might be into it. Nice graphics, gameplay gets old.
Raging thunder lite - Haven't tried the full version.
Amtalee lite - 3d puzzle game
Abduction - Papi jump, but with a cow.
Craigs Race - Awesome game, be sure to calibrate your tilt sensor. Buy the full version for 2 faster cars
Radiant lite - like space invaders/asteroid mixed together
2 player reactor - great game for killing time with someone. See who can touch the screen when it turns white faster etc...
Emulators - There are currently emulators for ps1, game boy advance, super nintendo, nintendo, and most likely sega (haven't seen sega myself). The lite versions of each allow you to play games, just not save them. So you can try them out and see if that's your thing.
Widgets
Power widget - quicker than quick settings
Weather - not weather channel, this comes with your phone and shows you a 24 hour forecast, along with a weekly forecast.
Apps
NFL mobile (Verizon only) - Watch what is currently on NFL network live! Free!
Terminal Emulator (Root Users) - Good free terminal for entering commands
Pandora - Streaming radio based on your favorites
Overclock widget (Root)- allows you to set your CPU based on whether your phone is awake or asleep
Tesla LED - mototorch replacement that works with 2.2
Handcent SMS - Unleashes all of the options you could dream up for texting.
Wireless Tether (root) - share your 3g connection with wifi devices
ADW Launcher - Homescreen replacement that gets rid of the laggy 2.2 homescreen that is slow loading icons sometimes. Also allows for 4 items on dock, and 5 homescreens.
Games
iCommando - decent sniping game
Hockey Nations 2010 - Overpriced hockey game, but you might be into it. Nice graphics, gameplay gets old.
Raging thunder lite - Haven't tried the full version.
Amtalee lite - 3d puzzle game
Abduction - Papi jump, but with a cow.
Craigs Race - Awesome game, be sure to calibrate your tilt sensor. Buy the full version for 2 faster cars
Radiant lite - like space invaders/asteroid mixed together
2 player reactor - great game for killing time with someone. See who can touch the screen when it turns white faster etc...
Emulators - There are currently emulators for ps1, game boy advance, super nintendo, nintendo, and most likely sega (haven't seen sega myself). The lite versions of each allow you to play games, just not save them. So you can try them out and see if that's your thing.
Widgets
Power widget - quicker than quick settings
Weather - not weather channel, this comes with your phone and shows you a 24 hour forecast, along with a weekly forecast.
Sunday, August 8, 2010
LogCat not Working in Eclipse Mac
I installed ADT on my macbook pro the other day and everything went smoothly until I tried to debug my app. LogCat wasn't displaying anything. After searching online for a while, the only information I could find was that it just doesn't play nice with eclipse. It seems that when I close my emulator, LogCat throws an error saying it can't attach to the emulator. Then the next time I try to debug, I don't get any logs. Restarting Eclipse fixes the issue, but gets annoying, when I have to restart every time I want to debug.
I also can't seem to get any breakpoints to catch...no logs or breakpoints makes it hard to code.
UPDATE: If you just back out of your live wallpaper, rather than hitting the power button, you can go back to eclipse and hit "debug LiveWallpaperName", this will reinstall the current version of your apk. This way you don't have to detach from the emulator and LogCat will keep spitting out logs.
I also can't seem to get any breakpoints to catch...no logs or breakpoints makes it hard to code.
UPDATE: If you just back out of your live wallpaper, rather than hitting the power button, you can go back to eclipse and hit "debug LiveWallpaperName", this will reinstall the current version of your apk. This way you don't have to detach from the emulator and LogCat will keep spitting out logs.
Subscribe to:
Posts (Atom)