|
|
|
|
|
by senkora
689 days ago
|
|
Really interesting watch, thanks for sharing! So, if I understand correctly, this is roughly what he did: 1. Wrote a transpiler to convert the subset of Javascript used by CrossCode into a dialect of Haxe. 2. Selectively modified his version of Haxe in small ways to more closely match the semantics of Javascript, to make writing the transpiler easier. 3. Selectively re-wrote complicated parts of the Javascript code into Haxe directly, so that his transpiler didn't have to handle them. 4. Transpiled <canvas> and other browser API calls into calls to his own pre-existing Kha framework for Haxe, which provided similar APIs. 5. Compiled the Haxe output into C++. 6. Compiled the C++ to native code. Damn. |
|