Hacker News new | ask | show | jobs
by fatty0011 4681 days ago
I'll take that as a compliment :) I actually was able to throw the site together in about a week. The full game on Windows 8 has more features like saved games, high scores, and Windows 8 functionality (start screen tile, charms integrations, etc). The online version is just a slimmed-down version of the game. Plus, I've got a lot of new features like achievements and multiplayer mode in the works.
2 comments

Is the game built in WinJS? Do you re-use the same code for both the game and the site?
Yes, the Windows 8 game is built using WinJS. However - and unfortunately - WinJS doesn't work on the web since it tries to call WinRT APIs which it doesn't have permission to use. Microsoft doesn't provide a subset of WinJS which works on the web so I essentially had to rip out all the WinJS code to make it work on my site. That meant I lost things like saved games and high scores since I used WinJS data binding to implement them. I also couldn't integrate with the Windows 8 charms from the web so I had to get rid of that stuff as well. But other than the UI and page navigation, the rest of the code is exactly the same on the app and the web.

I'm working on removing WinJS from the Windows 8 app since I only use it in a couple places where I can roll my own solution. If I accomplish that, I should be able to simply copy the same files onto my server and have it work on every browser. That would be pretty cool!

Very cool. I built a simple Windows 8 app, but rolled most of my own JS solutions b/c of a lot of the same reasons you had.
It's very well done.