Friday, December 28, 2007

HOW TO: XNA-BASED GAME ON A WEBPAGE

For those of you interested in my article ("Xna & Beyond"), I have -what I consider- an interesting update (btw, don't forget to vote for my article since it's on a compo!).

You may remember that I was trying to investigate how to use the Silverlight technology with XNA. The bad news is that v1.1_alpha does not allow to host WinForms controls; the good news is that v2 -the new name for the final release of v1.1- will do!

I didn't want to wait so thinking more on the problem, I remembered how to embed an .NET assembly into a web page. Digging further into the subject I finally succeded. Read the section The "Silverlight" At The End Of The Tunnel for details and also download the new sample code.

A strong word of warning here: the new example code provided in the article is for learning purposes only. So do not recommend -as I don't recommend it- anyone to modify his/her machine's security giving full trust to any assemblies or websites since it could open the door for security risks.

Maybe I should start and hold a project at CodePlex. I don't know ... we shall see ;)

Well, enjoy!

7 comments:

  1. Hey great article but your link is wrong, you should change your anchor to something without spaces and quotes :)

    Greetings,

    Roy T.

    ReplyDelete
  2. Awesome article, have just been playing about with this and it was great fun.

    I had to have a play with it to get keyboard input working from the panel to my GSM, but all works now.

    Here is a pic of it in action: http://bp2.blogger.com/_M662VMUvojw/R6zIEDS8vBI/AAAAAAAAAQg/TTvPFJtNNk8/s1600-h/XNA+in+webpage.JPG

    ReplyDelete
  3. Thanks. Good to know it worked.

    Btw, that font you have there is great!

    ReplyDelete
  4. Yes I like it, it is called Sea-Dog I get all my fonts from a great site here: http://www.webpagepublicity.com/free-fonts-s3.html#Free%20Fonts

    Some don't play well with XNA, but most do.

    ReplyDelete
  5. Good tutorial,

    But, Im wondering if the xna game is downloaded to the client's computer.

    ReplyDelete
  6. Thanks!

    I did a long time ago and since I published it I never touch the code again.

    But if I remember well, when you use the code a new folder is created somewhere in the "username" folder containing the needed files.

    So, if you're playing with the code right now, maybe you can find that out and refresh my memory :)

    ReplyDelete

Any thoughts? Post them here ...