Entries in Verlet (1)

Dart Experiment

I made a small web experiment using Dart to see how suitable the language is for game/graphics/physics programming.

Live demo / GitHub

The demo is an example of point-masses and stick-constraints using the verlet integration; Thomas Jakobsen's excellent article "Advanced Character Physics" introduced me to the concept and got me interested in physics programming several years ago.

I really prefer Dart to Javascript and would love to see it getting adopted by the major browsers. Here is my short wishlist for the Dart team:

Please...

  • get rid of the underscore prefix and introduce a proper "private" keyword
  • optimize the VM for vector algebra and immutable types if you don't want to introduce "value types"
  • integrate WebGL

Here are a couple of things I believe are bugs that I encountered while making the demo:

  • Assigning a variable through a get method actually compiles, for example: instance.getMethod = 5
  • Some expressions are not considered constant and won't compile if used in a static statement, for example: static final var strings = ["hello", "world"] - See the comments