Friday, July 4, 2008

Wireless Apps (www.wireless-apps.net)






I wanted to let you know that the sister site to Wireless-gaming.com has also received a facelift.

Both sites have been completely updated. In case you haven't visited http://www.wireless-apps.net/ yet: it’s an excellent site to purchase Smartphone applications.

Currently the website has the top applications for:

Blackberry, Palm, Windows Mobile (both touch and non-touch screens), UIQ and Series 60 phones (most Nokia smart phones). Of course iPhone applications will be sold when they're available.

Take a look, just like http://www.wireless-gaming.com/ it has a great interface and we're very proud of the site.

Thursday, July 3, 2008

5 Application Every Windows Mobile Developer Should Use

As a Windows Mobile developer with quite a few years of experience I would like to pass on a few of my favorite tools.

These are 5 programs I couldn't (or at least wouldn't want to) live without.

In no particular order:

Paint.net
http://www.getpaint.net/

This is an excellent freeware paint program. No it won't replace Photoshop but this is excellent for quick edits. If you can use MS Paint, you can use Paint.net. I've been using it for months and never ran into a bug.

Visual Assist
http://www.wholetomato.com/

This program is unfortunately not free. In fact, its very pricy. I'd like to tell you its overpriced but the amount of time you'll save using Visual Assist will more than make up the cost. It adds brilliant shortcuts to toggle between .h and .cpp files, it does an excellent but non-intrusive job of color coding your code. It finds spelling mistakes in comments, it has an excellent predicition engine to help cut down on typing, etc, etc etc. Just install the 30 trial - you'll love it. Note - last I checked it won't work on Visual Studio Express.

Beyond Compare
http://www.scootersoftware.com/

I know there are a lot of tools to do file comparisons but this one is simply flawless. Its brilliant at comparing large quantities of files and equally compitent at comparing two text files. If you need more it has a great list of free plugins for comparing images, mp3s, hex, etc.

http://www.scootersoftware.com/download.php?c=v2plugins

At $30 its steal.

Notepad2
http://www.flos-freeware.ch/notepad2.html

This program may not be essential but its a nice upgrade to Notepad with low overhead. It has color syntax schemes for most common lanuages but is still light and simple like the original notepad. I use it for doing side by side comparisions with Visual Studio. If you want just a little more functionality do a search for Crimson Editor. Both are free and both work very well.

IcoFX
http://icofx.ro/

Now this program might not be very exciting but when you need it, its perfect. I have been searching for years for a descent icon editor and have probably wasted more hours than I care to admit. I've even bought two retail icon editors but nothing comes close to IcoFX. If you're creating Windows Mobile Icons from pre-created images - this is the only program you need. It makes it dead simple to create multipage icons with different sizes and bitdepths. And it does an excellent job scaling down images. For Windows Mobile, I simply create one 64x64 image and let IcoFX do the rest.

Wednesday, July 2, 2008

Follow up to Windows Mobile Development on Vista




In a recent post I mentioned my troubles with syncing the windows mobile emulators (ie cradling) with the Sync Center on Windows Vista.


As it turns out it was quite an easy fix (and to be fair - something I should know by now). It appears that syncing over DMA isn't enabled by default which is what's required to "cradle" the Visual Studio 2005 WM Emulators.


The fix is to simply open the Windows Mobile Device Center, open the Connection Settings (the link will appear under "Mobile Device Settings"), select the check box beside "Allow connections to one of the following:" and finally change the drop down selection to DMA.


That's all it took for me.


Good luck and happy developing

Wireless Gaming (www.wireless-gaming.com)



I'd like to introduce you to a relatively new online sales website for wireless games.

Specifically - for Windows Mobile, Palm, Symbian Series 60 (Nokia Smartphones), UIQ (most Sony-Ericsson phones), and Blackberry. iPhone games should be added soon.

This is a site I helped develop, I'll admit that up front, but I do think it’s an excellent website and has quite a few advantages over the competition.

So first off, you can take a look here: http://www.wireless-gaming.com/

Wireless-Gaming has been designed to be easy to use, both for shopping and browsing.
We put this site together because we felt it was just too hard to find the top games on other online websites. There are amazing quality games getting very little attention in the mobile market because they're not associated with a great brand. And there are some that are associated with a big name that still fall through the cracks.

All of the titles on Wireless Gaming have been hand selected for quality and of course fun. Take a look, the site's interface, is, for lack of a better term: really cool. And of course its VeriSign secured so you don't have worry about your personal information being miss-used.

The entire site was just completely updated so even if you have browsed the site before, it’s worth looking again. And please feel free to post any comments or questions here.

Tuesday, July 1, 2008

Windows Mobile Development and Vista

A popular question when Vista was first released was "Should I upgrade to Vista?"

Now that Vista has been well established and through its first service pack I decided to give it a try. As a Windows Mobile developer there are quite a few things to consider before making this choice.

At this point I'll jump ahead and save you some reading if you want to know my answer to the question. If you're a Windows Mobile developer and you're using Embedded Visual Studio - the answer is simple - No.

EVC 3 and EVC 4 don't work on Vista and they aren't likely to work anytime soon (if ever).

There are further considerations - I primarily use Visual Studio 2005 (and will likely be upgrading to 2008 in the near future ... but that's a different topic). So the jump to Vista wasn't too problematic. And it’s probably good that it’s forcing me to update those last few projects from EVC to VS 2005.

My biggest complaint is the VS 2005 emulators and the Microsoft Sync center. I have been completely unsuccessful in syncing the emulators with the Sync Center. Now I know it’s possible and I'm sure if I spend another hour or two it will eventually work. But I really feel if Microsoft is going to sell an Operating System with the word "Ultimate" in the title - I shouldn't have to waste precious time convincing it to behave nicely with Microsoft's own development tools. Vista Professional and Visual Studio 2005 cost enough that these products should work out of the box.

My other hiccup is a direct result of changing from the 32 bit version of Windows XP to Vista 64. Unfortunately all of the development SDKs now install into c:\Program Files (x86)\.... so all of my build scripts are temporarily broken. Now this is trivial to fix but does require extra time.

And a quick side note - 64 bit Windows operating systems now have two program files folders because of the "Common Files" sub folder. If 32 bit and 64 bit applications shared the same "Common Files" sub folder it would be far too easy to break applications when installing both varieties of applications.

Despite all of the above issues I will be sticking with Windows Vista on my primary development computer. But I will make sure I always have access to at least one computer running Windows XP "just in case".

From a pure productivity point of view I don’t see any reason to upgrade to Windows Vista.

Thursday, June 19, 2008

Dithering Images for Mobile Devices

I wanted to share some of my experiences creating images on mobile devices. My experience in this respect is specific to Windows Mobile, however this will likely transfer to other types of smarpthones or handheld devices.

First a little background on colors and our ability to perceive them (this is relevant). Scientists believe we're able to distinguish roughly 10 million different colors/shades. So computer scientists have decided that displaying colors from a possible selection of about 16.7 million colors should cover what we can see. This is known as 24 bit color - or TrueColor. In 24 bit color, we use 8 bits of information for Red, 8 for Green and 8 for Blue. 8 Bits gives us a range of values from 0-255. So as you can now work out - we have 256 possible values for each color - and 256x256x256 gives us about 16.7 million.

Now on mobile devices, where memory is limited and screen sizes are small anyways - most modern smartphones use 16 bit color screens instead. On 16 bit devices you get 5 bits for Red, 6 bits for Green and 5 bit for Blue again. So our total number of colors is 32x64x32, which equals 65536. And on a small screen this gives us a pretty good looking image in most cases.

Where you run into trouble is with images that consist mostly or entirely of one color - for example - a gradient that goes from Black to Blue. In this case, we will not be using Red or Green at any point in the image, so we can only differentiate the color by changing the Blue level. With 5 bits we get 32 steps, so if we draw the gradient mentioned above, you will be able to see 32 bands of color and at 16 bit there is no way to get additional shades of Blue.

This is an excellent example of where dithering can be useful. Dithering, simply put, is the act of adding noise or errors. As it relates to images, this noise can be done in such a way that it will fool the eye into thinking there are more colors present.

Now at this point if you'd like further clarification there is a wealth of information online discussing this in further detail: a simple Google search will do nicely.

I would like to focus on the practical aspects. So back to creating mobile software, if you're creating graphics on a desktop machine I would recommend first creating all of your images as 24 bit graphics and then using software to dither to 16 bit. My favourite application for dithering is ACDSee Pro 2.

This will accomplish three things:
1. Your images will be dithered so they will look as good as possible on a 16 bit screen
2. Your images take up less disk space (50% smaller in the case of bitmaps)
3. Your images will load faster as the device isn't required to convert from 24 to 16 bits when displaying (on Windows Mobile devices there is a performance penalty for this)

Now onto the really interesting part, if you create any graphics in code, ie, dynamically generate gradients, controls, etc. You can still dither from 24 bit to 16 bit.
You'll need to create a 24 bit memory buffer, render to the 24 bit buffer using full 24 bit values.

Now you'll create a second 24 bit buffer to copy the dithered version using your algorithm of choice. Once you've copied this over you'll then want to copy the dithered information to a 16 bit buffer. This is easier than it sounds as all of your 24 bit values with be "16 bit friendly".

My favourite dithering algorithm is the standard Floyd-Stienberg and Wikipedia has a great write-up containing pseudo code:
http://en.wikipedia.org/wiki/Floyd-Steinberg_dithering

This code is trivial to convert to C++ but note you'll need to dither each color individually (Red, Green, Blue) and your errors will need to be calculated individually as well.

And of course you'll need to keep an eye on the edges, you can simply indent by one pixel all around when dithering. In "most" cases this won't affect your results.

Please feel free to write if you have any questions or comments.

Arkon Universal PDA Mounting Kit

As the title suggests I recently ordered an Arkon Universal PDA Mounting Kit after a recommendation from a user on www.myg900.com.

My mounting kit arrived yesterday and I have to admit I'm impressed. The Universal has three mounting options however one doesn't really count as it involves placing a plastic disc on your dash using the supplied adhesive.

The other options are a windshield mount and a vent mount. I assumed I'd simply use the windshield mount as its quite solid and its the mount of choice for most GPS devices. However, the vent mount is really easy to install/remove and its in a perfect position in my Acura CL.

The only signifigant draw back to this solution is the lack of a power cable. Fortunately, I already had a car charger that was included with one of my past cell phone purchases so this wasn't a concern.

I'm currently using the mount with an iMate JAQ3 and a Toshiba G900 - both of which sit very securely. I also briefly tested the mount with three other phones: The HTC Touch and the Motorola Q should work very well. The mount is too wide to grip narrow phones like the T-Mobile SDA (iMate SP5).

Arkon Homepage: http://www.arkon.com/