SpriteHand
Module Border
  Most recent blog entries
Module Border
Coding4Fun Show - Physics Helper
Andy's Blog By Andy Beaulieu on 6/9/2009 6:21 AM


Brian Peek has a new show on Channel9 called Coding4Fun TV. Brian is the author of the famous Wiimote Library as well as the Coding4Fun Book.

I had the pleasure of being Brian's guest for the first episode of Coding4Fun TV! We talked about using the Physics Helper Library to code simulations and games in Silverlight.

You can view the episode here.

 

 
Comments (0)

Blend Artboard Exceptions and Loaded Event
Andy's Blog By Andy Beaulieu on 6/3/2009 8:35 AM

It can be frustrating when you are coding along in Silverlight, and you open up a UserControl in Blend only to see something like the following:


An Exception was thrown.
InvalidOperationException: HtmlPage_NotEnabled
StackTrace
InnerException: None

This is often caused by a UserControl that has a Loaded event with some code that isn't happy inside Blend's artboard. That's right - when you preview a UserControl inside Blend, the Loaded event for the control actually fires, and code in that handler is executed! You may have noticed this when you place a StoryBoard.Begin() call in the Loaded event, Blend will actually show the animation on the artboard.

So how do we workaround these exceptions? First, expand the StackTrace arrow, and you'll get some more details. In this case, we can see that the Loaded event for a UserControl named "ucResults" is the culprit:

Now that we know which Loaded event is causing the issue, take a look at the code and see what is going on. In this case, the code is accessing the HtmlPage class - which would not be available to Blend when it hosts the control on the artboard:

private void UserControl_Loaded(object sender, RoutedEventArgs e)

{

    // Did the QueryString contain an Email address?

    if (HtmlPage.Document.QueryString.Keys.Contains("Email") )

        txtEmailTo.Text = HtmlPage.Document.QueryString["Email"].ToString();

}

Luckily, there is a special class, System.ComponentModel.DesignerProperties, which allows us to check at runtime whether we are in Design Mode or not. We can just add a check on this, and if we are in Design Mode, we get out of the Loaded event handler:

private void UserControl_Loaded(object sender, RoutedEventArgs e)

{

    if (DesignerProperties.GetIsInDesignMode(this))

        return;

 

    // Did the QueryString contain an Email address?

    if (HtmlPage.Document.QueryString.Keys.Contains("Email") )

        txtEmailTo.Text = HtmlPage.Document.QueryString["Email"].ToString();

}

 

Comments (1)

Boss Launch wins Server Quest Contest
Andy's Blog By Andy Beaulieu on 5/28/2009 10:25 AM

Wow, it looks like the winners are up on the Server Quest Contest site, and I'm very excited to see that Boss Launch took first place! You can check out Boss Launch and all of the great entries at the Server Quest Gallery.

BOSS LAUNCH CLIPART FIGHTER PLAY WITH YOUR PEAS

Comments (4)

GeekSpeak on Game Programming
Andy's Blog By Andy Beaulieu on 5/28/2009 6:51 AM


I had a great time doing my first MSDN GeekSpeak yesterday on Silverlight Game Development! The format of this show is really great - it offers an open forum where the attendees can fire off questions in real time.

You can download the recorded show here.

(Unfortunately, the performance of LiveMeeting when demo'ing games is pretty horrible, so feel free to try the demos live at spritehand.com).

Thanks to Glen Gordon and Jim O'Neil for hosting!!!

 

 

Comments (0)

Upcoming Silverlight Talks
Andy's Blog By Andy Beaulieu on 5/7/2009 11:00 AM

I have a Silverlight Seminar and a webcast coming up at the end of May -if you're available then come and check them out!

GeekSpeak on Silverlight Game Development
Wednesday, May 27th 2009 3pm EST
The geekSpeak webcast series brings you industry experts in a "talk-radio" format hosted by developer evangelists from Microsoft. These experts share their knowledge and experience about a particular developer technology and are ready to answer your questions in real time during the webcast. To ask a question in advance of the live webcast, or for post-show resources, be sure to visit the geekSpeak blog.

Silverlight Seminar, presented by ACM
Saturday, May 30th 2009 8:30am - 4:30pm EST
Horizons Computer Learning Center, 6711 Towpath Rd., Suite 100, East Syracuse, NY 
This will be an all-day Introduction to Silverlight, with Hands-on-Labs.

 

Comments (2)

SilverArcade Opens its Doors!
Andy's Blog By Andy Beaulieu on 4/20/2009 7:07 PM

SilverArcade is now live! This "free online game community" offers Silverlight-based diversions for the casual gamer, and per-play revenue for the Silverlight game developer. SilverArcade is the brainchild of Bill Reiss, Rob Eisenberg, and Chris Bennage.

It's great to see Silverlight coming into its own, seemingly with video and casual gaming leading the way (and with LOB apps closing the gap for the lead?!)

Comments (0)

Boss Launch... LAUNCHED
Andy's Blog By Andy Beaulieu on 4/4/2009 8:22 PM

I had some time to update Boss Launch with a few fixes, a couple more levels, and some sound effects and loops. There are now five environments: Office, Forest, Desert, Beach and Moon! I also added a neat little "poke" functionality that allows you to move the Boss Ragdoll around by clicking him with the mouse after he is launched. This is really handy for knocking those closeby targets to the ground! I have a busy few weeks ahead, so this is probably how Boss Launch will stay for the next little while.

Go and have some fun!

Comments (3)

Whats New in Silverlight 3 Graphics: Slides + Demos
Andy's Blog By Andy Beaulieu on 3/29/2009 10:46 AM

Thanks to everyone who attended my Silverlight Sessions at Code Camp 11! Chris Bowen and Chris Pels did another great job organizing what is the best free developer community event in the Northeast!

As promised, here are the slides and resources from the Silverlight 3 Graphics talk:

Up Next: Cre8 Conference

I'm excited to be presenting at the upcoming Cre8 Conference in Orlando, FL on April 15-16th! Cre8 is a conference for creative professional and covers the gamut of designer tools - everything from Flash, Dreamweaver, Photoshop... and yes, Silverlight. I'll be presenting:

Silverlight for Designers: Bridging the Gap from Designer to Developer
Discover how to create an effective workflow that allows designers and developers to collaborate on interactive projects. Build easy-to-use interfaces that connect simply to Web services (the ‘cloud’), databases, XML content, and more.

 

 

Comments (2)

Physics Helper gets 1st Place at MIX09 Show Off!
Andy's Blog By Andy Beaulieu on 3/25/2009 10:27 AM


Wow, I just found out that the video I submitted for the MIX09 Show Off! event got first place! I heard the competition was fierce this year, I just wish I had been at MIX to see the show, but it was too close to the MVP Summit this year.

So here is the video I entered, in which I try to channel Billy Mays to create a commercial for the Physics Helper Library. (I was also poking fun at the official rules which said "Please, No Commercials!") And no, my Photoshop skills aren't that bad, I just pasted my head on there in a big hurry :) 

VIEW THE VIDEO

Comments (7)

Behaviors in Expression Blend 3
Andy's Blog By Andy Beaulieu on 3/24/2009 3:49 PM


One of the really fun and productive things coming to Expression Blend 3 and Silverlight 3 is the concept of Behaviors.  In a nutshell, you will be able to drag/drop a Behavior in Blend 3 onto a UI Element on the design surface, and that will automatically inject runtime logic into that element. Behaviors aren’t a new concept, and there is even an equivalent in the ASP.NET AJAX world if you’ve played with creating custom controls in that universe.

Physics Behaviors!

One of the most fun examples I’ve seen using Behaviors was done by Pete Blois, a Program Manager on the Expression team at Microsoft. Pete and another developer created some Physics Behaviors which very closely mirror the Physics Helper Library I created for the Farseer Physics Engine. I first saw Pete demo the Physics Behaviors at the MVP Summit a few weeks ago, and my jaw dropped at the similarities! Pete & Co.’s Physics Behaviors use the Box2D Physics Engine.

Getting Started with Behaviors

If you’re playing with Silverlight 3 and Blend 3, why wait? You can play with Behaviors today! Note this is all Beta level stuff, so be prepared for some hiccups along the way

Pete’s MIX Session – Pete Blois gave a great overview of Behaviors in this MIX 09 session.

Using Behaviors – A quick Walkthrough by Kirupa on how to use behaviors! Pay special attention to where you find the assembly Microsoft.Expression.Interactivity.dll - you'll need that for the next link.

MIX Behavior Pack – this contains the Physics Behaviors, as well as a bunch of others.

Creating New Behaviors

It turns out it’s pretty easy to create your own behaviors, and I’ll be covering this in a later blog post. But if you can’t wait, just download the MIX Behavior Pack and have a look at the Behaviors, all of their source code is included!

 

 

Comments (1)

Module Border Module Border
Module Border
  Subscribe
Module Border
RSS   Twitter
Module Border Module Border
Module Border
  Diversions
Module Border

TALKING RAGDOLL
This Windows Phone 7 App was created using Silverlight, the  Physics Helper Library,  and the Farseer Physics Engine. It gets interesting when you import your friends photos and have your way with them!

MORE INFO



DROPPYPOP
This Windows Phone 7 game was created using Silverlight, the  Physics Helper Library,  and the Farseer Physics Engine.
DEMO

MORE INFO



BOSS LAUNCH
This physics game won first place in the Server Quest Contest. Created using Silverlight 2, the Physics Helper Library,  and the Farseer Physics Engine.
PLAY IT

MORE INFO



DESTROY ALL INVADERS
A scrolling shooter game where the objective is to destroy the invading UFO's flying over a neighborhood of your choosing. Imagery provided by Microsoft Virtual Earth. Created using Silverlight 2.
PLAY IT

INFO AND CODE



PHYSICS HELPER DEMOS
These demos were created for the Physics Helper Library, which makes it easy to create physics games and simulations using Expression Blend, Silverlight, and the Farseer Physics Engine.
PLAY IT

INFO AND CODE



HOOK SHOT
This little basketball game took first place in the TeamZoneSports Silverlight Contest. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



SORT THE FOOBARS
A game where you need to sort the good foobars from the bad ones. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



POLYGON PHYSICS DEMO
A demo showing polygon physics where the user draws physics objects with the mouse. Created using Silverlight 2 and the Farseer Physics engine.
PLAY IT

MORE INFO



SILVERLIGHT ROCKS!
Destroy the asteroids before they destroy your ship! Created using Silverlight 2.
PLAY IT

INFO AND CODE



FISH GAME
A simple game of harpoon-the-fish. Written using the AJAX Sprite Toolkit.
PLAY IT

INFO AND CODE

Module Border Module Border
Module Border
  Search_Blog
Module Border
Module Border Module Border
Module Border
  Blog_Archive
Module Border
Module Border Module Border
Copyright (c) 2013 andy.beaulieu.com - Login