Cornflour Blue, Game loop not running.

Nov 16, 2010 at 10:45 AM

Hi Guys,

I'm working on a game as part of my group work project for university this year. One of the things that we're interested in doing is taking our XNA game (no actual code yet) and deploying it using SilverSprite on Facebook. I've been tasked with doing some small proof of concept demos to make sure everything works before we comit ourselves to using any one technology (although XNA is a requirement).

I have taken my particle system library from an old XNA game, imported it to a silverlight project as per the instructions on the SilverSprite codeplex home page, and everything builds fine. However, when the applet runs in the browser (F5 debugging in VS2010) all I get is a cornflour blue game screen in the browser.

I've investigated with break points, and it seems that the game code is never being reached. As far as I can tell there are no exceptions occurring.

I'm fairly new to silverlight (having only used the alpha and beta versions a few years back) and am wondering if there's anything basic that I am doing wrong with the debugging of the applet. The game works fine in XNA. I've created an empty game project from scratch, changed the background to something else in the Draw() method, added it to a silversprite project and got the same cornflour blue results.

I'm using SilverLight version 3 and XNA 4, developing in Visual Studio Pro 2010.

I'll try to post some code and screen shots later this evening when I get back to my dev pc.

If anyone can advise me on how to go about debugging this problem, it would be much apreceated.

Thansk for your time,


Nov 16, 2010 at 10:53 AM
Edited Nov 16, 2010 at 10:53 AM

If you could zip the entire project it would be even better :)

If you don't want the code out public you can send it to me: mads (at) and I will take a look at it.

Nov 22, 2010 at 7:30 PM

Ok I've looked at the source now and the game now runs on my machine. 

I send a email directly to Matt with a more detailed answer, but no others can use that, so here is a general description of what I did to make it work, so others can benefit from that hopefully.

The general problem were that Matt were loading some textures that wasn't in his game. The reason why Matt didn't found that out himself were because he couldn't debug and therefore couldn't see the error. (That's my guess, I haven't talked with Matt about this :)) 

So an important thing to remeber is that you can only debug your application if you have a Web project, like a Web Application Project, that hosts your Silverlight application. Therefore the default .html page that is generated, can't be used for debugging. That's why Matt's breakpoints wasn't hit.

After I had debugging working it were pretty easy to see that Matt tried to load some image files (textures) that wasn't in the project and had some simple null pointers in the game. 

Hope this helps :)