Along with Expression Blend 2 came a new functionality for embedding fonts in your project. The problem is that this results in a heavier than expected .xap file, especially noticeable in a tiny little project.

I had in mind this very simple Silverlight Loader (to use as a splash screen) that contained one word that would slide back and forth. I created a TextBlock and embedded one of my favorite fonts to try; The result was a 59k .xap. In order to not have to embed any fonts in the project I converted the text to paths... I'm lying. I did it to better achieve the animation I desired.

Before doing this I prefer to modify the text to the right size although every modification is possible later as well.

Select the TextBlock and right-click or Object/Path/Convert to Path. Then you can separate the letters to be able to move each letter independently: select the path, right-click or Object/Path/Release Compound Path but then you need to fix the letters that form loops like A or O because they become two different paths (see image below). To do so select the two paths that form one letter, right click or Object/Combine/Exclude Overlap.

I especially like that now the text can have all the attributes of a regular path so the graphic rendering has the potential to be more sophisticated. The top text is a TextBlock while the middle one is the same converted to path. I left the O's without excluding the overlap to show what loopy letters look like right after being converted to path. The bottom row shows a few variations of what can be achieved with text as paths in Expression Blend 2.

After deleting the Fonts folder from the project I obtained 17k instead of 59k (wink!). You can see the result on Mashooo.com for 2 seconds while the games thumbnails are loading.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

I am releasing the code for the Baby-2-Woman Silverlight Loader demo project. You can download the solution from Api Junkie's Silverlight Loader project on CodePlex by clicking on SilverlightLoadersSolution.zip. It is a complete solution that you can open in Visual Studio 2008 and contains everything you need to get started creating your own loaders. You can find all the graphics and animations in ProgressBaby.xaml if you open it with Expression Blend. The code that updates the animation as the download progresses can be found in ProgressBaby.cs.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

I contributed to Api Junkie's Silverlight Loader project by creating the graphics that relate to the progress of the loading stages. I wanted to create something very esthetic without complicating myself too much so I did the whole thing from scratch in Expression Blend 2.
It's all vector graphics so the main tasks here were moving points around and adjusting gradient fills.

Good things:
I was very pleased with the results that can be achieved by playing with gradient brushes and color opacity. Notice the silky shiny hair, the diffused cheeks blush, the plump lips and my favorite effect: the body's volume. Also, I was able to make the torso, the arms and the neck appear like one whole shape. So besides animating shapes I also animated the color gradients by changing the positions and the angles with the Brush Transform tool.

Not so good things:
Starting with small shapes that I enlarged to animate them made me go back and reposition them in all previous keyframes because they would not stay in place. After I understood that when the size of an object changes so does its center (considered the reference point for its translation) I fixed this by modifying the object's layout width and height to a much bigger size so I wouldn't have to translate the object but just move point by point inside the bounding box. This was the case for 2 of the shapes that make the hair, the arms and the head.

I tried the opacity mask on the turquoise background to create the darkened bottom but it wouldn't show at all when I tested the project. Finally I just used a gradient fill with a darker version of the turquoise on one end.

The picture frame was very easy: I created the top side with the pen tool, colored it with a gradient fill, then copied, flipped and scaled to create the other 3 sides of the frame. Finally, not being completely pleased with the colors I modified the gradient fill in one of the sides, converted this brush into a resource and applied to the rest.

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Thanks to API Junkie the Silverlight gaming community has a new meeting place at Silverlight Games Forums on Mashooo.com. The comments for each game are now integrated to the YAF engine besides the forums directed to developers and designers. We are open to suggestions about forum topics so feel free to write to us .

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

When RC0 went out I waited a whole week before switching to it. I knew it was time when I started experiencing SWS, or Silverlight Withdrawal Syndrome, for I had stopped the development of a couple of interesting projects due to the uncertainty. I knew I was going to feel blind (not being able to see SLB2 apps anymore) but I had to use. We had also received a kind message from Tim Heuer warning us from the effects the then future-released-version would have on our applications (thanks Tim) which gave me the final push to make the move...

During the RC0 times, api Junkie took care of fixing a couple of things on our game Bumble Beegger (I didn't do my job, too busy playing with my new projs) but we didn't upload any of the changes. We felt like waiting until D day to polish Bumble Beegger as well as mashooo.com .

Following the great news of the release of Silverlight 2 my part of the fixes was very pleasantly simple.
After installing BlendV2SP1_en-Blend Service Pack 1.exe and Silverlight_Tools for Visual Studio 2008 SP1(RC1).exe:

   1. Some fonts' sizes changed: One of 3 similar textblocks presented a run tag with the FontSize property set to 14 which is the right size. The other two had no run tag and no FontSize property but the visual effect was that of the default 11 Fontsize as described by the Text panel in the Properties tab in Blend. I didn't go into solving the mystery as to how this actually happened; I swear the 3 texts where size 14 when Bumble beegger was up and running in SL2B2. I assume I didn't notice I left a run tag for one of them.
  Two possible fixes: either keep the run tag knowing that it overwrites whatever property you have in double inside the TextBlock, or just get rid of the run tag remembering to include all the properties required directly inside the TextBlock tag. I kept the run tags.

   2. A button event stopped working: way back in the SL2B2 days I learned the hard way that buttons were disgraced of the MouseLeftButton events and were granted a useful Click instead. Even so, when testing Bumble Beegger in RC1 a couple of hours before writing this, I notice I never got to fix the "by Mashooo" button on the lower right corner of the game screen (yes, it's a button) that links to a url. After replacing "MouseLeftButtonDown" for "Click" in Visual Studio the button still didn't work. What happens is that the code doesn't automatically change.
  To fix this I replaced the class "MouseButtonEventArgs" by "RoutedEventArgs" in the code page.

There are a couple of other controls that were affected like the data grid, used on the high scores screen. It still works properly but the widths of the columns have changed, something that I'll fix as soon as I feel like it.

Mashooo.com didn't require any visual fixes so it's there, up and running, on the new and improved *SL2*. Unfortunately most of the games are not yet updated :(

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

The reason why my Make text appear and disappear in Silverlight 2 didn't work anymore after some Silverlight updates is because I used the Mouse Down event on the button. After the update the correct way of making a button work is the Click event. The Mouse Down event works with shapes and other objects such as this rectangle:

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

They moved me to a new server that didn't support Silverlight so my apps stopped working properly. The solution can be found on Api Junkie's blog on his post: Fix for "Could not download the Silverlight application".

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

At first I was scheptical but I had nothing to lose so I submitted Mashooo.com as a sample of a Silverlight Application to the Silverlight.net Showcase. To my surprise it was up there in no time, Thanks to the silverlight.net team for considering us.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

After adding new games to The List this morning I checked what it looked like in Firefox 3 to find an empty area instead:
List of Silverlight games on Mashooo.com screenshot on Firefox3

The Localhost version looked fine in Firefox, just as did the live IE7 version:

List of Silverlight games on Mashooo.com screenshot on IE7


Since I am not a real programmer (yet) I fell in despair. I couldn't find any solution to my problem on the internet (or maybe I just don't know how to look, truth is I don't browse the web much, I'd rather suffer and waiste my precious time looking for answers inside my little brain than seek for help). About 3 hours and 50 addictive home videos of cute puppies later I remembered that yesterday I downloaded a Silverlight 2 update: bingo! It turns out my System.Web.Silverlight.dll had changed so I just uploaded it and voilà.

 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Check out the latest Silverlight games on The List: SilverMemory by Jan Willem Boer, War on Terrier by Avi Pilosof, Cube Zone by Erdem Cilingir and Minesweeper by Peter Blois.

Thanks to the Silverlight games developpers who have submitted me their creations!

Currently rated 2.0 by 1 people

  • Currently 2/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5