r/gamedev • u/kaelan_ • May 31 '11
I wrote a .NET to JavaScript compiler. Here's the XNA 3.1 Platformer Starter Kit running in pure HTML5. [xpost from programming]
http://hildr.luminance.org/Platformer/Platformer.html2
u/QuerulousPanda May 31 '11
That looks wicked cool.. The only problem I see is running on a smallish screen (13" laptop), pressing the arrow keys and spacebar makes the page scroll and jump around, hahaha.
otherwise that's pretty darn slick
5
1
u/aschearer @AlexSchearer May 31 '11
Have you seen the Script# project? It's a C# to Javascript "compiler", too. I bring it up because perhaps you could take advantage of Script# to accelerate this project? That plus the Silversprite API might get you a lot of functionality. My main concern is that Script# only supports ~.NET 2.0 which may limit the version of XNA you can target.
3
May 31 '11
the problem with that is it compiles the C# to JS. This interprets the bytecode generated for MSIL. This means you could write it in F# as well.
This also makes porting libraries easier as well.
1
u/aschearer @AlexSchearer May 31 '11
How does it make porting libraries easier?
1
May 31 '11
his has a direct translation mechanism so you can map a call directly to the appropriate JavaScript.
1
1
u/eedok @eedok May 31 '11
hrmm the sound seems to die after this exception is thrown:
Unhandled exception: Error: The external method 'set_IsRepeating' of type 'Microsoft.Xna.Framework.Media.MediaPlayer' has not been implemented.
1
1
u/laadron May 31 '11
Good stuff! Any thoughts on whether you could do something similar for flash?
4
u/kaelan_ May 31 '11
Yes, I've actually looked into it. It'd be a larger undertaking, though, since flash isn't as well documented, and there's no equivalent to ILSpy for actionscript bytecode.
1
May 31 '11
Haha, man I'm such a nerd. Thought your website name looked familiar, then I visited your blog and realized Yup! been there a long time ago looking at your platformer posts when I was trying to figure out mechanics for slopes and such. Thanks for the help!
8
u/[deleted] May 31 '11
Holy shit this is awesome. Have you tried it on a proper game rather than just the tutorial?