Physics Powered Games Logo
games  |  blog  |  about

Miniclip recently sent out a press release announcing support for Silverlight games on their site.  The announcement refers to a specific game, Zombomatic, developed by Terralever. The game has actually been on the Mini Clip site for a while along with another Silverlight game, Tunnel Trouble, by the same developer.

Although the timing of the press release is slightly delayed, this is still a big deal for anyone developing or planning to develop Silverlight games.

By announcing this in an official press release, it shows Miniclip, the largest online web-games portal with 43 million user, really sees a future in Silverlight as a gaming platform. It adds some legitimacy to what many of us early adopters already knew: Silverlight is a great platform for games.

I hope this will spur other flash-only game portals to take notice.  Silverlight games are coming. A LOT of them.  Web-game portals with a keen eye for the future will be ready.

Thank you Miniclip for leading the way...

A couple weeks ago, Larry Clarkin, from Microsoft interviewed me about the Farseer Physics Engine for the Thirsty Developer podcast.  The podcast is now available here here.

In preparation for the upcoming alpha release of Diver, I have updated the Diver landing page with a Silverlight 2 intro screen. It has waves! :-)

I've got a few more things to clean up before the alpha is ready for release.  I hope to have something up in the next couple weeks.

The game's graphics are not final so expect to see changes as I start releasing playable versions.

There is also no sound yet for the landing page. I'm still trying to find something that fits.

Here's a screen shot of the intro screen if you don't feel like jumping to the actual page.

Diver Landing Screen

Andy Beaulieu has updated his game, Sort the Foobars, for Silverlight 2.0 Beta 1.

The physics for Sort the Foobars is powered by the Farseer Physics Engine.

 

In the process of developing my Silverlight game, Diver, I came across what can only be a bug or limitation of the current Silverlight Beta 1 release.

If you create a PathGeometry in Blend using the pen tool, you can not automatically access the path data from code.

For example, the following snippet is the XAML created by Blend for a simple triangle. (I removed some of the attributes to to keep the code snippet short.)

<Path x:Name="Triangle" Data="M195,81 L267,173 L158,177 z" Fill="#FFFFFFFF" .../> 

(Note that Blend uses the short-hand path mini-language to describe the geometry of the triangle.)

Now, in Visual Studio, if you try to get access to the PathFigureCollection of the triangle's PathGeometry like so:

PathGeometry pg = (PathGeometry)Triangle.Data;
PathFigureCollection pf = pg.Figures;

no errors are thrown, but the pg.Figures returns null.

Furthermore, there is no property, that I could find, to get at the PathGeometry's mini language text.

It turns out this is only true of PathGeometry objects that use the mini language in their XAML mark-up.  If a PathGeometry is fully described (ie no mini language) then you can programmatically get at the PathFigureCollection.

The problem is Blend ONLY creates PathGeometry objects using the short-hand mini-language. There is no option in Blend to force full XAML mark-up for all PathGeometry objects.

This has been an issue since Silverlight 1.1 and I was hoping it would be fixed for the Silverlight 2.0 Beta, but no such luck it seems.

I have, however, found a bit of a hack to get around this for now.  This hack will force Blend to generate the full PathGeometry XAML rather than the mini language. 

Within Blend, go into XAML view and in the UserControl.Resources section add a bogus Storyboard like so. (I apologize for the poor formatting, my blog editor was not cooperating)

<UserControl.Resources>
<
Storyboard x:Name="PathGeomHack">                    
<PointAnimationUsingKeyFrames Storyboard.TargetName="MyPath">
                    
</PointAnimationUsingKeyFrames>
             
</Storyboard>
      
</UserControl.Resources>

Where "Triangle" is the PathGeometry for which I want Blend to render the full XAML.

Now go back to the design view and make an edit to the PathGeometry. I usually just slide a vertex point around a little. This is just to trigger Blend to regenerate the XAML.

What you should see is that with the bogus Storyboard pointing at your PathGemoetry, Blend will generate the full XAML tree rather than just the mini language.  This means you can then get programmatic access to the PathFigureCollection object from your code-behind.

I haven't done much else with this to discover any further simplifications or limitations, but this does give me what I need for now. Hopefully the next beta will have this issue resolved.

Hope this helps someone.

I have re-posted the Farseer Physics Silverlight Demos Here.

These demos were originally created for the XNA version of the Farseer Physics Engine. They were then ported to the Silverlight 2.0 Beta by Bill Reiss.

You can download the latest Farseer Physics Engine as well as the source code for these demos here.

Now that the the Silverlight 2.0 Beta is out I will try to get some updated demos posted soon.

Enjoy.

 

 

Here is a very cool, updated trailer to Walaber's gymnastics game that uses the Farseer Physics Engine.

The Farseer Physics for Silverlight video put together by Bill Reiss and Andy Beaulieu took second place in the MIX 08 Show Off competition.

Check it out here

The videos should be up soon.

For those that don't like to read, you can get the new version of the Farseer Physics Engine here.

Well, Silverlight 2.0 Beta 1 is finally here and we can't have a new Silverlight without a new Farseer. Literally! Turns out some things changed that broke the Farseer Physics Engine. Thanks to Bill Reiss for finding and fixing the issues.)

You can find the release notes with all the changes in the documents included with the downloads.  I'm also posting them below for convenience.

Have Fun!

Release Notes For FarseerPhysics 1.0.0.5

(Italic items indicate possible breaking change. Sorry for the trouble.)

  • Renamed delegate Body.OnChangedHandler to Body.UpdatedEventHandler
    • May require name fix in your code.
  • Renamed Body.OnUpdated to Body.Updated
    • May require name fix in your code.
    • This was done to conform to naming guidelines for .Net frameworks.
  • Renamed Event Body.OnDisposed to Body.Disposed
    • See above for fix-up guide and reason.
  • Renamed Geom. CollisionHandlerDelegate to Geom.CollisionEventHandler
    • May require name fix in your code.
    • Conforming to .Net framework naming guidlines
  • Renamed Geom.CollisionHandler to Geom.Collision
    • May require name fix in your code.
    • Conforming to .Net framework naming guidelines
  • Renamed GeomList.GeomAddedRemovedDelegate to GeomList.ContentsChangedEventHandler
    • May require name fix in your code.
    • Conforming to .Net framework naming guidelines
  • Renamed GeomList.GeomAddedHandler to GeomList.Added
    • May require name fix in your code.
    • Conforming to .Net framework naming guidelines
  • Renamed GeomList.GeomRemovedHandler to GeomList.Removed
    • May require name fix in your code.
    • Conforming to .Net framework naming guidelines
  • Made name changes similar to GeomList to BodyList, ControllerList, and JointList

 

  • Modified FluidDragController
    • Previously, the FluidDragController used an AABB to describe where the ‘fluid’ drag should take affect. In order to make the fluid drag controller more flexible and able to use ‘shapes’ other than an AABB, I changed it to use an ‘IFluidContainer’ interface instead. (see below)
    • Probably not many using this as it’s new and undocumented
  • Added LinkedList, LinkedList.Node and Stack collection classes to new namespace Collections.Generic.
    • These were added for the Silverlight version of the engine since they do not exist in the new Silvelight 2.0 beta.
    • The XNA version will still use the native .Net version of these collections.
    • Thanks to Bill Reiss for adding these classes and fixing up the SelectiveSweep and SweepAndPrune broad phase colliders to use them.
  • Added IFluidContainer interface
    • This interface defines 2 methods
      • Intersect(AABB aabb) determines a sort of broad phase intersection
      • Contains(ref Vector2 vector) determines if a point is contained by the FluidContainer
    • Any class that implements these 2 methods can be used by the FluidDragController.
  • Added AABBFluidContainer
    • Implements the IFluidContainer interface for AABBs.
  • Added WaveController
    • Implements IFluidContainer
    • Controls the generation of 2D rolling waves
  • Added new ‘Controllers’ namespace
    • I expect to develop more and more controllers and felt a namespace was in order.
    • Springs, the Base Controller class, and Controller Factory will remain in the Dynamics namespace. The Controllers namepace is more for higher level things like waves and water physics.
  • Added “Enabled” bit to controllers so they can be turned on and off
  • Added the following methods to the Calculator class
    • Note:These were provided by ‘sickbattery’ from the codeplex forums. I have not had a chance to test them so let me know if you find any issues with them
    • public static float VectorToRadians(Vector2 vector)
    • public static Vector2 RadiansToVector(float radians)
    • public static void RadiansToVector(float radians, ref Vector2 vector)
    • public static void RotateVector(ref Vector2 vector, float radians)
    • public static Vector2 LinearBezierCurve(Vector2 start, Vector2 end, float t)
    • public static Vector2 QuadraticBezierCurve(Vector2 start, Vector2 curve, Vector2 end, float t)
    • public static Vector2 QuadraticBezierCurve(Vector2 start, Vector2 curve, Vector2 end, float t, ref float radians)
    • public static Vector2 CubicBezierCurve2(Vector2 start, Vector2 startPoitsTo, Vector2 end, Vector2 endPointsTo, float t)
    • public static Vector2 CubicBezierCurve2(Vector2 start, Vector2 startPoitsTo, Vector2 end, Vector2 endPointsTo, float t, ref float radians)
    • public static Vector2 CubicBezierCurve2(Vector2 start, float startPointDirection, float startPointLength, Vector2 end, float endPointDirection, float endPointLength, float t, ref float radians)
    • public static Vector2 CubicBezierCurve(Vector2 start, Vector2 curve1, Vector2 curve2, Vector2 end, float t)
    • public static Vector2 CubicBezierCurve(Vector2 start, Vector2 curve1, Vector2 curve2, Vector2 end, float t, ref float radians)
    • public static Vector2 InterpolateNormal(Vector2 vector1, Vector2 vector2, float t)
    • public static void InterpolateNormal(Vector2 vector1, Vector2 vector2, float t, out Vector2 vector)
    • public static void InterpolateNormal(ref Vector2 vector1, Vector2 vector2, float t)
    • public static float InterpolateRotation(float radians1, float radians2, float t)
  • Added Body.ClearImpulse()
    • This is similar to ClearForce() and ClearTorque()
    • When you create a pool of bodies this helps “Reset” the body when it is released to the pool.
  • Added Body.ResetDynamics()
    • This method will reset position and motion properties of the body.
    • Useful when creating pools of re-usable bodies. It would be used when releasing bodies back into a pool.

Walaber (www.walaber.com), developer of numerous physics powered games including Jelly Car, Trampoline, Stunt Playground, etc. has posted a video of a gymnastics game prototype. (see below)

Walaber informed me he is using the Farseer Physics Engine to power the gymnast. 

Like my game, Diver, his gymnist prototype is using a physics based animation and control scheme similar to Ski Stunt Simulator

In my opinion, this control scheme is VERY under-utilized in games today. It provides a fluid sense of control beyond what most games offer.

It's hard to explain in words why it's so great, you really need to experience it. To do that, you can either fire up Ski Stunt or wait for my game Diver or Walaber's gymnastics game.

Given Walaber's track history, this latest effort of his is sure to be a fun, physics powered game.

I'll be keeping an eye on it as it develops. You should too.

Here is the video: