{"id":207,"date":"2006-01-18T09:47:54","date_gmt":"2006-01-18T15:47:54","guid":{"rendered":"http:\/\/blog.codedread.com\/?p=207"},"modified":"2006-01-18T09:47:54","modified_gmt":"2006-01-18T15:47:54","slug":"svg-time-waster-solitaire","status":"publish","type":"post","link":"https:\/\/www.codedread.com\/blog\/archives\/2006\/01\/18\/svg-time-waster-solitaire\/","title":{"rendered":"SVG Time Waster: Solitaire"},"content":{"rendered":"<p>I came across <a href=\"http:\/\/david.bellot.free.fr\/\">David Bellot<\/a>'s <a href=\"http:\/\/david.bellot.free.fr\/svg-cards\/\">SVG cards<\/a> awhile back and thought it would be cool to put together a simple online card game in <a href=\"http:\/\/www.w3.org\/Graphics\/SVG\/\" title=\"Scalable Vector Graphics\">SVG<\/a>.  <!--more--><\/p>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n<p>The SVG cards (2.0) are a 1MB gzipped SVG file.  Unfortunately, in the currently available version there is a fatal typo that cripples the cards in Firefox and Opera.  The xmlns:xlink namespace is improperly spelled as <em>\"http:\/\/www.w3org\/1999\/xlink\"<\/em> which should be <em>\"http:\/\/www.w3.org\/1999\/xlink\"<\/em>.  It's amazing to me how a simple typo like this can render the XML useless.  Anyway, I let David know about the typo and gave him some further suggestions on how to make his beautiful cards more useful to SVG application developers.  He said he plans to release a new version soon.<\/p>\n<p>For now, I'm using a seriously stripped-down version of his cards in my playable demo:  <a href=\"http:\/\/www.codedread.com\/solitaire.php\" title=\"Online SVG Solitaire\">Solitaire<\/a>.  I also thought I'd use <a href=\"http:\/\/rr.latenightpc.com\/wp\/\">Rob<\/a>'s <a href=\"http:\/\/rr.latenightpc.com\/wp\/archives\/2006\/01\/13\/embedding-svg-in-wordpress-posts\/\">new WP plugin<\/a> to inlay the SVG into my blog, but that didn't seem to work quite right in IE+ASV.  Not sure why yet...<\/p>\n<p><a href=\"http:\/\/www.codedread.com\/solitaire.php\" title=\"SVG Solitaire\">Click here to play SVG Solitaire in the full browser window<\/a>.<\/p>\n<p>It's a little rough around the edges, there's no \"win\" screen or message, and some of the drag\/drop tolerances may be a little off.  To reset the game, you just reload the web page.  It's also a little slow in Firefox (but quite snappy in IE+ASV).  Doesn't work yet in Opera 9 due to the dragging problems I've been experiencing (I've heard from Opera developers that this problem should be fixed in the next build).<\/p>\n<p>I also had to update my <a href=\"http:\/\/www.codedread.com\/code.php#dragSvg\" title=\"Draggable SVG Library\">Drag SVG library<\/a> to allow me to register callback functions on drag events, something I should have obviously foreseen when I first wrote the library.  Version 1.1 of the library is <a href=\"http:\/\/www.codedread.com\/code.php#dragSvg\" title=\"Draggable SVG Library\">here<\/a>.<\/p>\n<p><script type=\"text\/javascript\" src=\"http:\/\/www.codedread.com\/googleads.js\"><\/script><br \/>\n<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I came across David Bellot&#8217;s SVG cards awhile back and thought it would be cool to put together a simple online card game in SVG.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,25,46,11,28],"tags":[],"class_list":["post-207","post","type-post","status-publish","format-standard","hentry","category-games","category-software","category-svg","category-technology","category-web"],"_links":{"self":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/207","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":0,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codedread.com\/blog\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}