Archive for January, 2008

iPhone update 1.1.3 - Released

Just seconds ago Apple released the long awaited update to the iPhone.  It’s about a 162mb download but well worth the wait.  Check out apple.com for a video of all of the new features.  There are a few cool features, but the GPS positioning is the most exciting for me.  Here are the features I have played with thus far.

  • The ability to send an SMS message to multiple people
  • Google Maps uses GPS to pinpoint your location using cell tower triangulation
  • Google Maps can now display the Hybrid map view
  • You can now drag and drop application icons on your home screen
    • You can also add bookmarks to the home screen 
  • The home screen supports pagination

There are a few things I have not found…I hope they are in there somewhere

  • Copy and Paste
  • Voice recording

Silverlight how to: Frame-by-Frame Animation

For the past few weeks, Terralever has been developing our second game using the Silverlight framework. Our first, Zero Gravity was a great success and highlighted the power that Silverlight can bring to casual gaming development. For years, Terralever has been developing games in Flash and is very fortunate to have some incredible flash interactive developers.

One of the essential elements found in all interactive games is frame-by-frame animations. When a character moves across the screen that movement is a combination of repositioning the character as an element, combined with a sequence of character movements (the animation).

Now I don’t pretend to be a Flash developer, but what I have been told is that creating Frame-by-Frame animations in flash is very easy. You simply create a key frame and insert an object on to that frame. The combination of all key frames produces the animation sequence.

In Silverlight / Blend 2 December Preview creating this type of animation sequence is more difficult. Storyboards in Silverlight are independent of any canvases that will contain the individual animation sequences. Creating a key frame in Silverlight, does not generate a new canvas. In our first Silverlight game we achieved frame-by-frame animations by stacking a series of frames (canvases) and modifying the objects opacity property to appears as if we moved through the sequence. This technique was extremely difficult to work with in blend.

We figured there had to be a easier way. Instead of stacking the frames on top of themselves and using opacity, I decided to position them adjacent to each other and discreetly move the parent canvas from right to left. Think of it like an image strip when the first image starts at X=0 and each adjacent frame is positioned (X+FrameWidth). The result was the canvas shown in Figure 1.

framesequence.png



Once the frames are positioned in the correct sequence, I created a Canvas.Clip to clip the main canvas at position 0,0 with a width and height equal to the size of each frame. This clip will mask all of the adjacent frames when we play the animation.

The next step was to create the animation storyboard. For my “less than” creative animation I generated 8 frames, each with a very simple vector. My storyboard will require 1 key frames per frame of the sequence, plus one additional key frame to get back to the starting position. By default, Blend will “tween ” between each key frame. To achieve a discrete transition, you must right click on the frame and select “Hold In “. This selection will change the xaml to a “DiscreteDoubleKeyFrame ” from a “SplineDoubleKeyFrame “. Once you have created a key frame you must move the strip “canvas” to its desired position. Figure 2 shows what the completed animation sequence looks like in the designer.

framestoryboard.png



Figure 3 shows the xaml generated from this sequence.

sotryboardxaml.png



To check out my super simple animation done in Silverlight 1.1 click here.

Download: page.xaml
Download: Solution

IMAP Gmail on iPhone

Over the holiday my wife was so kind as to use her hard earned Holiday bonus and buy me an iPhone. For the last two years I have had my trusty old Sprint Treo connected directly to my companies Exchange and personal POP3 server. Now that I have made the first step in switching to the dark side (I hear a MacBook Pro whispering in the distance), I have to accept that Mac’s don’t always play nicely with windows. iPhones do play nice with Google and specifically email services that offer IMAP support. Here are the steps I went through to get my iPhone to work with Gmail for Google Apps.

  1. Enable IMAP support in “Settings” for Gmail
  2. On the iPhone “Settings” -> “Mail” create a new “Other” account.
  3. Enter the following settings
    • Incoming Mail Server
      • Host Name: imap.gmail.com
      • User Name: email@somewhere.com
      • Password: *****
    • Outgoing Mail Server
      • Host Name: smtp.gmail.com
      • User Name: email@somewhere.com
      • Password: *****
  4. Click Save and go to the “Advanced” settings.
    • Mailbox Behavior
      • Change “Drafts Mailbox” to “Draft”
      • Change “Sent Mailbox” to “Sent Mail”
      • Change “Deleted Mailbox” to “Trash”
    • Incoming Settings
      • Use SSL: ON
      • Authentication : Password
      • IMAP Path Prefix: [Gmail]
      • Server Port: 993
    • OutgoingSettings
      • Use SSL: ON
      • Authentication : Password
      • Server Port: 587

(Note: Since I am using Google Apps my username will be at my own domain and not a username at gmail.com)

Google Apps for Domain Email

Google AppsFor those of you in hibernation for the last few years, Google is taking over the world, one free service after another.  This weekend I decided to break ties with Godaddy’s crappy email hosting (5 accounts, 1 GB storage, $20 year) and switch to Google Apps.   My reasons were quite simple, Free is Free and I really wanted IMAP support.  I know that the risk is pretty high with “big brother” now in control, but for IMAP support and >6 GB of storage per account, I think it is worth the risk.

For the most part the switch was painless.  The first step in the process was to create an account and prove that you own the domain.  Proof is achieved by creating a custom CNAME record in your DNS that maps to google.com.  Once the domain is validated you can begin creating user accounts.  In my situation I only had 5 accounts so I created them manually, but for larger organizations they have a “csv” upload utility that imports a large batch.  Once I created all of the accounts, I added any necessary account alias (they call them nicknames) and then switched my hostnames MX records.  Google warns that it could take up to 48 hours, but in about a hour the changes had propagated to my internet provider.

If you choose to make the switch, make sure that you tell of of your users to access there new account via the web first.  Google makes you enter a “captcha” image and agree to a terms screen.  Once this is completed you can enable IMAP support and import you existing email.  Google does NOT provide an import tool, not even from one Gmail account to another.  The approach most take, is enable POP access on your old account, and suck in all of the email using there Mail Fetcher.  Make sure that if you had “labels” you recreate those before importing as well as manually create all of your filters.