Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I just stumbled on this library/language called Coffescript, and thought it would do the coding part so much easier.

As an example, drawing maps with a for loop would be:

map = [0, 0, 0, 0, 0]

drawTile = (tile, tx = tile * ts, ty = 0) -> c.drawImage(tile, tx, ty)
drawTile tile for tile, i in map

Translates to this:

var drawTile, i, tile, _i, _len;

drawTile = function(tile, tx, ty) {
  if (tx == null) {
    tx = tile * ts;
  }
  if (ty == null) {
    ty = 0;
  }
  return c.drawImage(tile, tx, ty);
};

for (i = _i = 0, _len = map.length; _i < _len; i = ++_i) {
  tile = map[i];
  drawTile(tile);
}

I've only had an hour to look at this, but sofar I think its beautiful. My question is how would this fit into HTML5 game development? Could there be any problems using this that I don't see?

I know the code above is useless in a real game, but I haven't figured out loops yet.

share|improve this question
1  
There's no such thing as any inherent problem in using X language for development. They may have certain quirks you have to deal with (try debugging in PHP for example) but as you use a language you learn the best ways to work with it. –  Mike C Jul 22 '12 at 12:53
add comment

closed as not a real question by Byte56, Joe Wreschnig, Tetrad Jul 23 '12 at 21:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 1 down vote accepted

No, there is no problem in using CoffeeScript, if you really want to (I like this language, too). Everything that runs in Javascript runs just as well in Coffeescript.

The only issue you could have is with debugging. The only way to debug is to look into the Javascript code, which is not the code you produced. But if you can handle that, go ahead.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.