Show HN: An isometric marble run build in CoffeeScript
marbleo.us
marbleo.us
Edit: now I figured out what the big problem is: you can't see where it's headed when it's underground. In Roller Coaster Tycoon, when your train went into a tunnel, there was a sort of transparent view of the underground track. I think having that here would make a lot of sense.
The game has "classes", like this:
https://github.com/bni/orbium/blob/gh-pages/js/tile.js
https://github.com/bni/orbium/blob/gh-pages/js/inspector.js
So I think it will translate well.
Anyone with CoffeScript experience that can share what its like to convert over a codebase from JS -> CoffeScript?
Fair warning, the syntax in that screencast is a bit out of date.
For your codebase, instead of having to "call super" manually:
orbium.Inspector = function(count, xnr, ynr, vari, col) {
this.setBase = function() {
orbium.Tile.prototype.setBase.call(this, "modtile");
};
}
It'll look more like: class orbium.Inspector extends orbium.Tile
constructor: (count, xnr, ynr, vari, col) ->
...
setBase: ->
super "modtile"Im concerned about adding a compile step, since I like the "just reload" workflow a lot that you get with JS.
text/coffeescript script tags could help out with this. But from the the CoffeScript site: "it's not recommended for serious use". Why not?
Using `text/coffeescript` script tags works, but isn't recommended because you're effectively programming through an eval(), and debugging becomes more difficult.
But the block selector doesn't resize with the window. Please could you fix that?
Escher's work is an example of how an isometric perspective can be manipulated to present an impossible object, such as a staircase that appears to go upwards even though the 'top' stair is connected to the 'bottom'.