 |
|
 |
|
|
Physics Helper 4 Released |
|
Andy's Blog
|
By Andy Beaulieu on
10/21/2010 1:16 PM
|
|
|
|
Today I released a new version of the Physics Helper Library, which makes it easier to create Silverlight 4 and Windows Phone 7 games using the Farseer Physics Engine.
Here are the highlights for this release:
- Now supports Version 3 of the Farseer Physics Engine
- Bullets
- Continuous Collision Detection
- Resting Bodies
- see the Farseer project page for more details on this release of the Farseer Engine!
- Installer (msi) makes setup easier
I am very excited about the great work that the Farseer team did on version 3 of their engine. They sort of went back to the drawing board and brought in enhancements from the Box2D Physics Engine, which Farseer spawned off from long ago.
In the past, it was possible to hit tunneling problems (objects colliding and sticking together) with Farseer, and lack of support for resting bodies made large worlds difficult. But with the new enhancements, these issues have been resolved!
Please note that this is an initial Alpha version of the Physics Helper 4.0, and given the big change in the Farseer Engine, you can bet that there are some bugs and things yet to be implemented. But I have been using it for my latest creations and feeling quite productive with it. Be sure to view the Intro Video and read through the Docs to get started.
|
 |
|
Comments (12)
|
|
|
|
Marketplace and the App Hub |
|
Andy's Blog
|
By Andy Beaulieu on
10/14/2010 4:53 AM
|
|
|
|
My first two apps for Windows Phone 7 are now on the Marketplace!
|
 |
Talking Ragdoll Available in "Entertainment"
App Details
Marketplace Link (requires Zune + IE)
This is a fun little physics toy that repeats what you say in a funny voice, and also acts like a little voodoo doll. You can put your friends head on the ragdoll and then have your way with them - throw beer bottles, eggs, tomatoes, etc. |
 |
DroppyPop Available in "Games"
App Details
Marketplace Link (requires Zune + IE)
This is a fun physics game where you control a ragdoll falling through a sky full of balloons. You can grab balloons above you by tapping and holding on the screen, and change gravity by tilting the device. It has some nicely rendered graphics and parallax backdrop, and local and world high scores service. |
My Experiences with the App Hub
This past Monday (Oct 11, 2010) Microsoft unveiled its new developer portal for submitting applications for Windows Phone and Xbox 360 Indie Games, http://create.msdn.com. I was lucky enough to get early access to Marketplace Submission, and wanted to share some of my experiences.
Ian Walker has posted some great tips on his blog as well, so be sure to check those out.
While the process was pretty simple and smooth, it wasn’t without issues – in fact, as I write this the portal is down entirely! But keep in mind that this is the first real world test of the App Hub and they are most likely shaking out the bugs.
Icons + Panorama Image
Be sure you have all of your icons ready as specified in the Marketplace Submission Guidelines. You'll need 99x99, 173x173, and 200x200 PNG format Icons, and they need to be the same image. Folks have had their submissions rejected because of different icon imagery. Also, avoid any transparency in your icons, because they will show up as white in the Zune client until the user hovers over them (thanks to Rene Schulte for that tip)
The Panorama Image should be 1000x800 pixels (there is still some old docs lying around that state otherwise, ignore them). The pano image is shown as your background in the Zune client when the user drills into your app using a link like this: http://social.zune.net/External/LaunchZuneProtocol.aspx?pathuri=navigate%3FphoneAppID%3D74e401d0-8ad5-df11-a844-00237de2db9e
If you are lucky enough to have a "featured app" (which I think equates to a top seller in a category), then your Pano image will also be featured as the Marketplace background for that category. Be sure that you do not include any text or title in your Pano image. The Marketplace UI does that for you.
Watch Your App Sub-category
This is something I hosed up when submitting my game. When you select the Category, it is easy to miss the Sub-Category drop-down next to it. Be sure to select this because even changing something as simple as this requires a full re-submission! 
Take Your Time and Plan
Really be sure that you take your time and get your verbiage right for your app description. Note that the app description CANNOT contain any formatting such as CR/LF or HTML breaks. This is a reall bummer and I hope they fix that soon because you can't really list out your app highlights in a bulletted list.
Same thing for your icons and images. Currently any tweaks at all to an image or text requires a full resubmital.
Turn-Around Time
Microsoft is shooting for "5 days or less" for approval of your apps. Because I participated in the early access program, my turn-around times might not be typical. But both my apps were approved in less than 2 days.
Get Ready for Feedback
This is something that many developers might not be used to: Immediate feedback on your creation! Once your app is on the marketplace, people can add reviews which I find can cause huge mood swings. For example, when I submitted my first game I saw this review come up:

Woohoo! Thank you. I did a little jig around the house. But then, some more reviews started popping up:

What is really frustrating here is that you cannot reach out to these people and help them, or ask them for more details. Why is the app taking too long to load? Do they know that the game has a "How to Play" tutorial in the Option screen? You'll never know because reviews are a one-way street.
Also note that there are very few WP7 devices out there in the world right now (I've heard just 2000 or so?), and guess who has those devices? Fellow developers --- probably your harshest critics!
Get Help
To be honest, I saw little or no help coming from Microsoft on the App Hub Forums, which was a bit frustrating. Maybe their hands are full with the App Hub early trial. But it did help to commiserate with fellow devs on the Forums who were having the same issues you were. It's great to know that you are not alone when something is awry!
Summary: Have Fun!
I have had a total blast since I first heard of Silverlight being the premier development platform for Windows Phone 7! If you've followed my blog, you know that I am a hobbyist game developer and have been creating casual games in Silverlight since the SL 1.1 Alpha (see them here). Like me, I hope you concentrate on having fun with WP7 and sharing your apps with others. And who knows, you might make a little money, 99 cents at a time!
|
 |
|
Comments (7)
|
|
|
|
Collision Detection on Windows Phone 7 |
|
Andy's Blog
|
By Andy Beaulieu on
9/27/2010 4:24 PM
|
|
|
|
If you're using Silverlight on Windows Phone 7 for casual games development, performing a HitTest to determine if two elements collide is a basic need. I've blogged about how to do this in desktop Silverlight in the past, and for the most part this technique works great in WP7... EXCEPT when your app is running in Landscape orientation.
[DOWNLOAD SOURCE]
The problem in WP7 is that FindElementsInHostCoordinates will always return elements in portrait orientation, so that they are rotated 90 degrees from the top left origin. We can work around this using a RotateTransform to determine what point we want to test.
public static Point HackPointForWindowsPhoneLandscape(Point pt)
{
double angle = 90;
Point ptOrigin = new Point(0, 0);
RotateTransform rt = new RotateTransform();
rt.Angle = angle;
rt.CenterX = ptOrigin.X;
rt.CenterY = ptOrigin.Y;
Point ptReturn = rt.Transform(pt);
ptReturn.X = ptReturn.X + 480;
return ptReturn;
}
In the download sample, the CollisionHelper class wraps this hack all up for you. You just need to use the CheckCollision method to see if two elements collide:
if (CollisionHelper.CheckCollision(ship, shipShell, asteroidXaml1, pathAsteroid1))
{
txtStatus.Text = "Collision with XAML Element!";
return;
}
That's it! This gives us pixel-perfect collision detection with pretty good performance.
|
 |
|
Comments (2)
|
|
|
|
Talking Ragdoll for Windows Phone 7 |
|
Andy's Blog
|
By Andy Beaulieu on
9/11/2010 5:19 PM
|
|
|
|
One of the suggestions I repeatedly heard for Boss Launch 2: Zombie Attack was the ability to customize the head for the Boss, so that you could stick your own boss’s head on the unlucky projectile. As I was working on getting this feature into the game, I began thinking that this would make for a great stand alone physics toy!
And so was born “Talking Ragdoll” – my third entry into the upcoming Windows Phone 7 Marketplace. I think this is really a fun time waster (and may actually have some real utility in that it allows for some great photo editing!)
Talking Ragdoll Features:
- Ragdoll repeats whatever you say, in a funny voice.
- Realistic physics – drag your ragdoll around and pose it any way you like.
- Throw beer bottles, eggs, grenades and tomatoes at your doll, with realistic effects.
- Paint on your ragdoll with the paint brush.
- Several high quality Heads, Bodies, and Scenes to choose from.
- Import your own pictures and use them as the ragdoll’s head!
- Take a snapshot of your scene and save it to your phone.
In some upcoming blog posts I’ll explore some of the techniques I used in the game such as audio capture. As always, I look forward to any comments or suggestions.
|
 |
|
Comments (4)
|
|
|
|
DroppyPop for WP7 Update |
|
Andy's Blog
|
By Andy Beaulieu on
8/26/2010 10:15 PM
|
|
|
|
Yes it's a little early to be thinking about the Holidays, but with the final release of the Windows Phone 7 tools imminent, we can bet that shiny new WP7 devices will be in many stockings this year. My hobby hours have been consumed with getting a couple of games ready for launch, and I was able to get a loaner LG prototype for a week which provided a great sanity check. I can tell you that the emulator is really a fantastic representation of the final device, the only caveats being performance and feel of the accelerometer input (one thing I caught immediately was that I had reversed one of the Accelerometer Axes in my code!).
As I mentioned before, I am creating both a Web and WP7 version of DroppyPop, which is great because it allows people to test the game and give feedback before the release of WP7. I'd like to thank everyone for all of the feedback so far - I have incorporated many of your ideas and fixes!
DroppyPop Update
Today I released an update to DroppyPop, which for a limited time unlocks all rag dolls and power-ups! (The final release will have a Trial version which will only unlock one rag doll and disable all power-ups). There is also new game play and new power-ups to look out for in this version.
If you have a few moments of casual gaming time, then please give this new version a try - I look forward to your feedback.
If you find a bug or have an idea, please let me know by either:
- Adding a comment to this blog post
- Using the "Feedback/Bugs" link inside the Game, under Options.

|
 |
|
Comments (0)
|
|
|
|
|
|
WP7 Back Button in Games |
|
Andy's Blog
|
By Andy Beaulieu on
6/14/2010 6:35 PM
|
|
|
|
In order to publish a Windows Phone 7 application on the Marketplace, your app must pass a list of certification requirements. One of the items in the Windows Phone 7 Certification Requirements caught my eye:
5.2.4 Use of Back Button in Games
a. Pressing the Back button from the first screen of a game must exit the application.
b. During gameplay, pressing the Back button in games must present an in-game menu. This menu must offer the option to resume the game. Pressing the Back button while this menu is up must exit the game. Microsoft recommends that you save the user game state or warn them of possible progress loss before exiting the game).
c. Outside gameplay (for example, when the user is viewing the options or help menu), pressing the Back button must return to the previous menu or page.
In order to conform to this requirement in a Silverlight game, we can override the OnBackKeyPress event of a PhoneApplicationPage, and if the game is playing we can present the user with a "pause menu" allowing them to resume or exit the game. Here is an example of an OnBackKeyPress override that I'm using to show an in-game menu.
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
{
if (ucMainGame1.GameState == ucMainGame.GameStates.Playing)
{
e.Cancel = true;
ucMainGame1.PauseGame();
}
}
To stop our app from closing due to the back button key press, we just set e.Cancel to true.
That's all there is to it. If your app has some deeply nested screens, for options and such, you will likely want to navigate to the screens using a NavigateUri property of a Hyperlink control. This way, the back button will take you back to previous pages and fulfill requirement 5.2.4.c.
|
 |
|
Comments (7)
|
|
|
|
|
Droppy Pop: A Windows Phone 7 Game |
|
Andy's Blog
|
By Andy Beaulieu on
5/10/2010 7:48 PM
|
|
|
|
| ME: |
I've been working on an idea for a Windows Phone 7 game and I'd really like your feedback and ideas. |
| YOU: |
But I don't have a Windows Phone 7 device yet. I've been looking under bar stools but all I find are iPhone's. |
| ME: |
How about this? Since the game is written using Silverlight, why don't I just give you a link to a Silverlight Web version of the game, which uses the same source code, and you can give that a go? |

In DroppyPop, you control a rag doll which is falling through an endless sky of balloons. Pop as many balloons as you can for points while avoiding the bombs and baddies along the way.
I've been developing DroppyPop using the methods I described in a previous blog post, namely using multi-targeting to create both a Silverlight Web version and a Windows Phone 7 version using the same source code. I develop about 90% of the time in the Silverlight Web project, and then use Linked Files from a Windows Phone 7 project to build a version for WP7. This has a couple of major advantages:
- It's faster to compile and run outside of the WP7 emulator
- You end up with both a Windows and Web version
This method has been working great for me, and there are only a few instances where I need to use compiler directives to use different logic for the two platforms. This is possible because Microsoft did a fantastic job on the port of Silverlight for the Phone!
Your Feedback... Please!
Let me know what you think of DroppyPop. Does the concept work? Are there any bugs? Would you pay 99 cents for the full version? :)
You can leave feedback here in the comments, or inside the game under Options/Feedback.
|
 |
|
Comments (13)
|
|
|
|
|
 |
|
 |
|
|