turbulenz / turbulenz_engine

Turbulenz is a modular 3D and 2D game framework for making HTML5 powered games for browsers, desktops and mobile devices.
http://turbulenz.com
MIT License
4.57k stars 513 forks source link

Any thoughts on possibly moving to Dart lang instead of using TypeScript? #45

Open henrytseng opened 9 years ago

henrytseng commented 9 years ago

Seems like Dart is making good head way to building strong programming practices.

dtebbs commented 9 years ago

TypeScript suits our needs quite well at the moment. In particular it gives us a very high degree of control over the generated JavaScript, and makes it trivial to mix JavaScript and TypeScript. It's difficult to imagine being able to justify the cost of switching our actual engine code.

However, I'm sure it would not be too difficult to create Dart declarations for the Turbulenz engine and develop your code against those. Potentially these declarations could be automatically generated from our .d.ts files.

Again, I'm not familiar enough with Dart to know if this is really practical. If you have any experience or insight into this kind of thing I'd be interested to hear.

joseluis commented 8 years ago

I'm currently evaluating 2d physics engines for a Dart project. And I like the one that comes with this turbulenz, but since there's no Dart API ready I'll probably end up using either box2d or p2 Dart ports for now.

But it would be entirely possible to interoperate with the js files of turbulenz, by declaring the API in a Dart file. There's a full example with the chart.js lib, and info.

dtebbs commented 8 years ago

Thanks for the comments. We don't currently have any plans to provide the Dart declarations. Based on our experience with TypeScript, adding the declarations is easy enough that I'd suggest it's often worth doing it yourself so you can use the libraries you prefer. I'm guessing it's similarly easy with Dart.

(It also appears that there is now at least one project to generate Dart declarations from .d.ts files. I have no idea how stable it would be, but it could be interesting to try and may provide the bulk of what you need.)

joseluis commented 8 years ago

Thanks @dtebbs, I didn't know about that project, I assume you're referring to this one. I'll give it a go.