Drawing Farseer Physics vertices and body center in Silverlight [More]
Game development in Silverlight 3 – slides and demos [More]
The samples have been upgraded to Silverlight 3.0, which means that the source code is now targeted at the Silverlight 3.0 Tools for VS2008. Besides that the Farseer Physics Engine code have been upgraded to version 2.1.1.
Go and get the new release from Codeplex.com
I just upgraded the samples to run with the Farseer Physics Engine 2.0.1. I also removed the Demo6, which were empty at the moment and added some text different places.
Get the lastest release from CodePlex.com
I plan/hope to be able to make more samples which will get a little more advanced, still simple-advanced, but I will add a little more complexity to it. I will do it in the same way as up til now by having completely seperated projects that can run on them own. Well, this is the plan, let's see how it turns out.
I have just published a 2. release of the Farseer simple samples / tutorial(s) on codeplex.
Check it out here
The new release includes the following:
Demo1 Basic application with a falling yellow box. Demo2 Controlling the box with the keyboard. This includes the KeyHandler.cs from the original Farseer Physics Engine. Demo3 This demo introduce Geometry and Vertices, which are used to keep track of collision between the two yellow boxes in this demo. The boxes have different mass. Demo4 This demo adds a little more complexity as we here use an interface called IUpdateable. This is done as we now have two different types of classes that need to be updated at the gameloop. We both have the PhysicsBox from all the other demoes and a new FixedLinearSpringBrush, which is used to draw a line. In this demo you can click one of the boxes and drag it by moving the mouse and holding down the left mouse button.
As you might know, I created some small "simple samples" in silverlight 2.0 for the Farseer Physics Engine here on my blog. Today I have started putting them on Codeplex.com. I thought I would put them some place else then my blog, as more people maybe will benefit from them, and I have a nice work item/source controll for free also (TFS).
In the first release there is only one single project called "Demo1". It's showing you how to make the farseer engine run, as simple as possible. The samples also works a a kind of tutorial /tutorial, as there is pretty many comments in the code, where I try to explain why I do the different kind of things.
Enjoy - http://www.codeplex.com/Farseersimplesamples
Brandon Trabon wrote me (a comment on this post) the other day and said thanks for my "simple-samples" for the Farseer Physics Engine. It had helped him getting started with the engine, which makes me very happy to hear, as that were the exact reason I created them.
As a bonus Brandon have made similar sample with collision too, so I have put this on my blog too.
Note: I haven't been able to test this my self due to my Silverlight 2 beta 2 problems, but I'll put it up anyway with this disclaimer :)
Download the sample with collision of the Farseer Physics Engine 220.127.116.11 here
In this sample you learn one way to capture keyboard inputs, react on them by applying force to an object and that way control the object in the game. Again this sample is a simplified version of the code from the original Farseer Physics Engine demo code.
You can download the source here.
And you can see the it running in your browser here.
Feel free to leave a comment if you got any questions.
UPDATE: Please note that there is a new release of this for Silverlight Beta 2: Check it out here.
When you are doing game development you sometimes wants to spice up the game with some physics. To do this from scratch, you need to be pretty good at math and have a lot of spare time. Lucky for us Silverlight Game Developers, Jeff Weber from Farseer Games, created a little engine to help us out. It's called the Farseer Physics Engine.
Currently the latest release is 18.104.22.168 which supports Silverlight 2 beta 1. This is the release used in this sample.
I am new to the Farseer engine myself, and have been looking on the internet for a, "Getting started with Farseer" tutorial, with out any luck. Therefore I desided to create my own. The release of the engine comes with some pretty nice demos, that shows you how to use the engine. The only problem is, that the code is pretty complex at first sight, which could make some people give up.
Therefore I have created this tiny project to show you how to make the engine run in the simplest form possible. The code should be pretty self-explaining. If you want to know alittle more about why the diffent things are done, you can read on Andy Beaulieu blog, which has a starting tutorial too. The only problem is thats it's for Silverlight 1.1 Alpha and therefore alittle outdated, but the basic things are the same as far as I can see.
(As I said, I'm new to the engine also, so this can maybe be done even more simpler. If you have some changes, please let me know. You can use the "Contact" here on the page and send me and email through that. Thanks in advance.)
You can download the source here. And you can see the it running in your browser here.
I hope you have a better idea of how to get the engine to work after looking through the source code.
Please note: The Silverlight 2 beta 1 currectly have a "region bug" when you position the elements. If you are running with US region settings, there should be no problem, but if you, like me, run with Danish Region settings, this sample will crash at first sight. So to be able to see/run this, you need to set your region settings to English (United States). This works for me.