Development of Air Soccer – What did we use and learn!

Please note that we have released real time online multiplayer version “Air Soccer Fever”. Download for FREE and have fun

Replaced SL+XNA to pure XNA since there were lots of issues with Microsoft Ad Control – crashed intermittently because it is not officially supported in SL+XNA mode. The rest of the article is still relevant for othee technologies . More of the XNA development story here “Air Soccer Tour development story”

First of all, lets start by saying WP7 Mango rocks :).

For beginners I would highly recommend the 13-part article series done by Peter Kuhn aka Mr. Goodcat  – blog:  MisterGoodcat blog

Article series here: XNA-for-Silverlight-developers-Part-0-Why-should-I-care

This post will describe the tool set we used in Air Soccer in the following categories:

  • Game Menu UI/Components
  • Game Play UI/Components
  • Social Gaming Network
  • Advertising
  • Analytics

Air Soccer would not be possible without the technologies listed – so we cordially thank the people behind these.

Game Menu UI/Components:

  1. The new template provided in WP7 Mango – Silverlight/XNA Hybrid template
  2. MVVM Light Toolkit
  3. LazyListBox
  4. WP7MarketplaceTools

The new SL/XNA hybrid template is awesome because it enabled me to do the menu screens in Silverlight and Gameplay in XNA – best tools in their respective categories. If I had gone for a XNA template only, I probably would have spent a lot more time on the Menu UI – I am sure some open source UI components are available for XNA, but the ease of data binding and blend design was just too good to pass. The gameplay page is basically a silverlight page but the rendering is done completely by XNA. The SL controls are first rendered to a texture and then the etxture is rendered by XNA.

The following msdn page described how SL/XNA Hybrid is one for the gameplay page – MSDN SL/XNA

The source code is available here: MSDN SL/XNA Sample code

I would say though, this ease comes with a performance cost – when the SL content is being rendered to a texture, the frame rate drops to 30 in some cases and you can see the jitter. However, you can do some tweaking e.g. do not do UIElementRenderer.Render(..) on every frame, because the UI doesn’t change much anyways, especially if you are only showing the SL content when the game is paused!


MVVMLight Toolkit by Laurent Bugnion is a great MVVM enabling framework – small footprint but delivers almost every bit you need.

You can find the toolkit and related discussion here: Galasoft MVVM Light


LazyListBox by Peter Torr (Microsoft)  is being used on the team selection page. The default WP7 listbox can be slow if you have a rich daattemplate with images etc. LazyListBox handles those issues by procrastination… needless to say, if there is one thing developers love to do that’s exactly that!

Blog and code for LazyListBox –    Lazy ListBox by Peter Torr


WP7MarketplaceTools by András (based in Hungary – developer of SurfCube – the awesome 3D web browser for WP7) is basically 4 trigger actions that have been used on the feedback page. The benefit is that I just added these behaviors in Blend to the buttons for Email, Marketplace rating, Marketplace Detail, Marketplace search.. no code required.

Sample & code here : WP7 marketplace behaviors


Game Play UI/Components:

  1. XNA for WP7
  2. Farseer Physics 3.2
  3. Mercury Particle Engine
  4. SpriteSheetPacker

All I can say about XNA is that SpriteBatch is awesome for simple 2D games – I still remember using DirectX 9 / C++ like 7 years ago on a big tactical simulation project, the endless night coding (or ninja coding as some would say) was lots of fun but it was a lot of work too. Moved on from graphics/gaming projects to LOB stuff which is exciting too, but I really missed game development. I am happy I finally decided to give WP7/XNA a try.. and its a lot easier as compared to C++/DirectX, the double pointers ( &&variable or **variable) and COM interfaces involved 🙂


FarseerPhysics by Jeff Weber (developer of Krashlander – one of the top games on WP7) is a great library for 2D physics simulation. Geometry, force, impulse, acceleration, velocity, collisions, bodies, joints .. you name it, they have it!

The samples provided are a little tricky at first because of the mini-framework they have built for the demos/samples – since you keep getting lost in the code – but a couple of hours will get you started. HIGHLY recommended!

project/code/samples here : Farseer on codeplex


Mercury Particle Engine or MPE is a nice lightweight particle engine by JimJams ( if you have to ask – that’s the codeplex handle).. I highly recommend looking into this gem. They have lots of emitters and particle effects can be done in C# code as well as in an XML file. Air Soccer v2 uses basic particle effects to show a starry trail when the ball is kicked with force.

project/code here : MPE on codeplex


SpriteSheetPacker by Nick Gravelyn is a life saver… you have to use a spritesheet instead of individual images/pngs so there is minimum texture switching and hence better performance. I was initially using the spritesheet pipeline code available on and it did the job initially but it hit a limit when the textures increased. Apparently it’s not scaling horizontally to pack stuff on 2048×2048 (max texture size for wp7). SpriteSheetPakcer is a must use!!

Available here: SpritesheetPacker on codeplex


Social Gaming Network:

  1. Scoreloop

Since I dont have XBox Live subscription, I was looking for a simple solution that will provide leaderboard / ranking functionality – dint want to stand up a server myself of course.

Scoreloop ( ) – primarily for Android and IOS, released a WP7 SDK to integrate social gaming / leaderboard/ currency / challenges etc etc – and it works really well for Android and iOS. Since the WP7 SDK is new… it has some room for improvement .. better documentation needed but all in all, its a great free service. Highly recommended.. with growing WP7 interest, I am sure scoreloop will make the SDK as better as the Android/iOS counterparts.

Also looked at a new player in the market specifically for WP7 – openXlive (  OpenXLive / ) . There is nothing wrong with the basic feature-set of openXlive – I just felt more confident with Scoreloop and their wide feature-set! if you guys give OpenXLive a try, lemme know about your experience.



  1. Microsoft Pubcenter – MS.Advertising ADControl
  2. ADDuplex

Advertising in WP7 game is one tricky topic 🙂 at least it initially was…

The situation right now is that you will find more/better/easier solutions for Silverlight than for XNA.. so another reason why choosing SL/XNA hybrid was a win-win.  I will start by saying that the MS Pubcenter  / MS ADControl is the best there is in terms of implementation and monetization. There were some issues in beta2 that were thankfully resolved. Even now make sure you specify explicit height/width on the ADcontrol.

See my blog post here on initial stats from advertising Air Soccer : Air Soccer Market Place Statistics & Analysis

ADDUplex ( ADDuplex website ) is an awesome tool to cross promote your app. The Silverlight control provided is pain-less… trust me, I tried 6 different solutions and broke several keyboards so when I say pain-less .. that’s a big compliment! well I dint really break anything but you get the point. I was looking at other solutions because I was concerned about monetization options outside US .. but as it turns out MS Pubcenter is generating revenue in 19 countries so I just deleted all the other SDKs .. and did I forget to mention the pain they caused!



  1. Flurry

MS AppHub does provide some interesting analytics but there are two issues that I think they will solve soon.  The app/game download count/stats information is delayed by 6 -days AND The crash report is not very developer-friendly. Even though using MS Pub center gives you an idea of how many countries/regions was your app used in for any given day; there is no indication of active users – a number you should be very very interested in. (ADDUplex by the way will give you a nice number – Daily Unique Active Users)

So I Initially used Preemptive Dotfuscator & Runtime Intelligence – free for WP7 (at least for now) – it was a good experience , development wise. And it did promise to provide good analytics (even though the UI/data presenattion needs some work)… but there was a lot of delay, data was not getting crunched for almost a week.. probably because it doesnt say realtime – its runtime 🙂  .. Say Hi to Flurry…

Flurry ( Flurry website is an awesome free analytics service – great UI – great data presentation and its near-realtime .. well ok.. its 5-8 hours delayed.. but hey I am not complaining 🙂

Hope this post helps some developers out there..  I apologize in advance if I have made a wrong comment about any of the libraries/components … please leave a comment!

Tagged with: ,
Posted in Uncategorized
6 comments on “Development of Air Soccer – What did we use and learn!
  1. Glad you could use our Marketplace behavior! Just looked at Air Soccer, it is very well done, congrats!

  2. Imran Shafiq says:

    Air Soccer showcased on WMPOWERUSER link

  3. […] We shared with you the development story of Air Soccer here “Development of Air Soccer – What did we use and learn!” […]

  4. […]   Development Story of Air Soccer Tour Silverlight […]

  5. Thanks for finally writing about >Development of Air Soccer – What did we use and learn! Dangling Neuron <Liked it!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog Stats
  • 142,877 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 368 other followers

%d bloggers like this: