Chris Cavanagh’s Blog

Entries from May 2007

Minor XBAP update

May 26, 2007 · 7 Comments

I’ve modified the XBAP 3D demo (the one with the beachballs) to use an updated version of the Managed Bullet Physics library.  The boxes now come to rest better (less jiggling) and performance has improved:

XBAP 3D physics

Click the image or right here to try it out.

Categories: .NET

Silverlight 2D Physics Source Code

May 24, 2007 · 2 Comments

You can get the source code for my Silverlight [1.1 Alpha] 2D physics demo here.  Some points worth noting:

  • It’s currently using an “old” version of the Managed Bullet physics library.  I’ll get that updated in the next few days…
  • It no longer uses the HtmlTimer!  It’s now using a Storyboard with a very short duration and attaching to the Completed event (much neater; big thanks to Mike Harsh for pointing me in the right direction!).  It seems smoother but does still ’stutter’; I’ll take a closer look at that.
  • I’d be interested to know if any Mac users can get the demo working; it’s possible there are some issues to iron out there…

Enjoy!  I’m looking forward to seeing a Silverlight version of Poopr someday.

Categories: .NET

Silverlight 1.1 2D Physics

May 22, 2007 · 25 Comments

UPDATE: This sample has been updated for Silverlight 2 beta 1.  See it in action here – now with heads! :)

Are you tired of physics demos yet?  I hope not because I’ve just made another one smile_teeth  It’s using the Managed Bullet Physics library I ported to WPF, tweaked slightly to run with Silverlight 1.1.  This might be the world’s first cross-platform physics demo! (umm, except Flade of course, and probably a million others I’m unaware of).

Points of interest:

  • You’ll need the Silverlight 1.1 Alpha runtime (or the SDK) for Windows.  Mac users can get it here.  Alternatively, if you just click the image above it might give you a direct download link…
  • It’s using an HtmlTimer to provide a ‘tick’ event for the animation.  Curiously HtmlTimer is already marked obsolete; hopefully when Silverlight 1.1 releases it’ll have something like WPF’s CompositionTarget.Rendering event. See below.
  • Similar to my original 2D physics demo, this is using a full 3D physics library but clamps it to 2D.
  • There’s a strange ‘pause’ that occurs every few seconds in the animation.  I can’t see anything in my code that’s causing it (it’s almost identical to the 3D XBAP demo I published earlier).  On IE it’s about 250ms, but on Firefox it’s more like a couple of seconds.  I’m assuming this is just related to Silverlight 1.1’s alpha status and will soon be fixed (don’t let me down guys! smile_angel).
  • It listens to the BrowserHost.Resize event to adjust the scale and translation to fit the window.  I’ve not added a full-screen toggle, but you can hit F11 to maximize the browser for full effect.
  • This has been sitting on my PC a few weeks already; I came up against some really dumb bugs (of mine, related to my ‘XnaToWpf’ bridge) and wussed out a few times.  It’s amazing how much easier it gets when the initial hurdles are gone…

Click the image above or this link to try it out.  Source code will be coming soon!

UPDATE: No longer using the HtmlTimer; source code now available! (see later post).

Categories: .NET

Poopr

May 15, 2007 · Leave a Comment

You just HAVE to check out Lee’s awesome Poopr application.  It magnificently demonstrates the awesome power of WPF and truly pushes the bowels bounds of innovation! (and perhaps decency).

Categories: .NET

Xbox 360 Elite HDMI

May 3, 2007 · 3 Comments

If you’re still on the fence about Elite’s HDMI output (most reviewers say it’s “barely distinguishable” from component) here’s my two cents: it’s awesome!  I’m running it on a “budget” LCD (Norcent LT3250; around $500 from buy.com last Black Friday) and the improvement from component is significant.  You won’t notice so much in gameplay, but whenever you’ve got some text (particularly dark text on a light background, like the dashboard) there’s no nasty ghosting or fuzziness at all smile_regular.  Is it enough to upgrade from Core / Premium to Elite?  Depends if you get a good sale price smile_wink.

Compared to the official VGA cable I doubt you’d see a difference, but there are reports of “washed out” colors over VGA so beware.  If you get a 3rd party VGA, make sure it has a nice thick wire to the VGA plug (good screening; I tried a “bad” one a while ago that had horrible ghosting on text smile_sad).

Of course the other advantage HDMI and VGA have over component is great upscaling of regular DVDs.

Categories: Blogroll · Family