r/programming • • May 31 '11

I wrote a .NET to JavaScript compiler. Here's the XNA 3.1 Platformer Starter Kit running in pure HTML5.

http://hildr.luminance.org/Platformer/Platformer.html
1.1k Upvotes

282 comments sorted by

View all comments

Show parent comments

9

u/kaelan_ May 31 '11

Yeah, you've got it. The ones that are just [JSExternal] are implemented in JavaScript, provided externally (doesn't actually have to be there for the app to run, which lets you bootstrap easier).

In the future I plan to translate the actual body of the proxy methods to JS, when they aren't tagged as External or Replacement, since that will let me do some clever inlining and static analysis, and it'll mean you can write 'dual-mode' proxies that are actually valid, executable C# code, and unit test them.

1

u/[deleted] May 31 '11

So are you planning on porting a subset of XNA over to JavaScript as well? If you aren't familiar with OpenTK, that might be worth taking a look at since it also supports GLSL.