Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Interpolation Sample for XNA

AddThis Social Bookmark Button
One thing I’ve always enjoyed in Silverlight/WPF are the easing functions ( http://msdn.microsoft.com/en-us/library/ee308751.aspx ). The easing functions are commonly used to provide interesting looking animations via key frame-based interpolation. XNA has a few, limited bits of interpolation built in (primarily Lerp (i.e. linear interpolation) and SmoothStep (i.e. cubic interpolation)). For a sprite animation project that I’ve since set aside (it’s not dead, but it’s been back-burnered for a while now), I replicated most of the Silverlight/WPF easing function (I never got around to figuring out BounceEase and ElasticEase) so that I could use them in XNA. I
decided I’d make them available to all of you to use as well. They’re great for spicing up menus and other animations. The important part of the sample is the Interpolation.cs/Interpolation.vb file; that contains the static class and the two enums that combine together to provide the interpolation. There are two solutions: Interpolation Sample and Interpolation Visualizer. Sample is a basic demonstration of how to use some of the functionality within an XNA game to do things like animate a sprite’s tint color, scale, and position. Visualizer is a WPF app that lets you see what the different enum...(Read whole news on source site)

Home : Blog List : Bob Taco Industries : Interpolation Sample for XNA