SilverlightShow: Silverlight n-Puzzle Game Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: Silverlight n-Puzzle Game <div>Nice article!</div> I remember when I was a child, I played a lot this game!  :) <br /> Check out WPF version of it that my friend did: <a href="http://www.codearsenal.net/2012/06/wpf-animation-fifteen-puzzle-game.html">http://www.codearsenal.net/2012/06/wpf-animation-fifteen-puzzle-game.html</a> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment8159 YuriBondarenko http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Wed, 13 Jun 2012 15:36:44 GMT Silverlight n-Puzzle Game hm need logic representation & logic program please http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment5702 kasep http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Tue, 15 Mar 2011 07:43:26 GMT playgames <p>http://www.gamesplay.co</p> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment4798 playgames http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Tue, 02 Nov 2010 08:00:52 GMT RE: Silverlight n-Puzzle Game <p>This was really a great tutorial, however, i have a trouble running it on a server, it can't reach the images. I tried altering the paths, in the app and physical and nothin.</p> <p>Do you have any idea what can be the problem?</p> <p> </p> <p>I trin even uploading your source as is and even so it doeesn't worked</p> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment4608 Eduardo Cis http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Tue, 05 Oct 2010 12:58:51 GMT RE: Silverlight n-Puzzle Game JAVA CODE! PLS ^^< http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment3310 Mebz http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Fri, 26 Mar 2010 00:37:35 GMT RE: Silverlight n-Puzzle Game this game is awesome http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment3187 kukinggala http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Sun, 07 Mar 2010 20:20:08 GMT RE: Silverlight n-Puzzle Game Hi <span id="ctl00_cphMiddle_ContentPlaceHolderContent_itemComments_dlstComments_ctl04_lblCommentAuthor">FigmentEngine</span><br /> Thank you for the idea, i was sure there is a smart solution of problem with the tile images, but I could not find it. I will try your solution.<br /> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment1277 ppopadiyn http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Wed, 25 Mar 2009 08:04:41 GMT RE: Silverlight n-Puzzle Game I did a similar puzzle to yours <a shape="rect" href="http://blog.figmentengine.com/2008/10/silverlight-puzzle-update-and-issues.html" shape="rect">http://blog.figmentengine.com/2008/10/silverlight-puzzle-update-and-issues.html</a> a while back. You don't need a webservice to create sub-tiles fom an image - use RectangleGeometry and image.Clip (you basically copy the image, clip it to the size you need then offset it in canvas:<br /> <br /> <p>  private Canvas SetupCanvas(Uri uri, int ratio, int sourceRow, int sourceColumn)<br />   {<br />    Image image = new Image();</p> <p>   image.Width = tilewidth * ratio;<br />    image.Height = tileheight * ratio;<br />    image.Stretch = Stretch.UniformToFill;</p> <p>   RectangleGeometry r = new RectangleGeometry();<br />    r.Rect = new Rect((sourceColumn * tilewidth), (sourceRow * tileheight), tilewidth, tileheight);<br />    image.Clip = r;<br />    r.RadiusX = 7;<br />    r.RadiusY = 7;</p> <p>   image.Source = new BitmapImage(uri);<br />    image.SetValue(Canvas.TopProperty, Convert.ToDouble(sourceRow * tileheight * -1));<br />    image.SetValue(Canvas.LeftProperty, Convert.ToDouble(sourceColumn * tilewidth * -1));</p> <p>   Canvas tileCanvas = new Canvas();<br />    tileCanvas.Children.Add(image);<br />    tileCanvas.MouseLeftButtonDown += new MouseButtonEventHandler((source, msg) => Debug.WriteLine(name));</p> <p>   return tileCanvas;<br />   }</p> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment1272 FigmentEngine http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Tue, 24 Mar 2009 18:09:29 GMT RE: Silverlight n-Puzzle Game <p>Amazing!!</p> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment1047 zafi http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Fri, 13 Feb 2009 05:39:01 GMT RE: Silverlight n-Puzzle Game <p>Great article!!!</p> http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx#comment1044 Radenko Zec http://www.silverlightshow.net/items/Silverlight-n-Puzzle-Game.aspx Thu, 12 Feb 2009 11:30:12 GMT