Quote Originally Posted by ?ëu?±o Mart??nez View Post
But DWScript website says it's a "scripting engine for Delphi". Does it do the translation?
It also says "Scripts can be executed from Delphi applications [...] or compiled into JavaScript that can be run client-side in a browser or any Javascript-capable engine"
So yes, it takes Object Pascal source, and spits out JavaScript.
Does it work on Linux? Does it work on WineHQ?
The JavaScript runs as long as you have a compatible web browser, anything not too ancient should be okay. For game stuff you need at least Canvas support, and the game is primarily tested/profiled for WebKit-based browser, ie. iOS, Android, Chrome & Safari.
FireFox, IE9 & Opera are okay except for some graphical glitches on the menu buttons (they aren't done in Canvas, but in HTML, and lack some specific CSS).

As for the compiler, at the latest news, DWScript compiles under FreePascal, but execution is problematic due to bugs in the FreePascal compiler/runtime wrt to Variants & Unicode Strings.