top | item 4027971

Portal game in CoffeeScript

74 points| necrodome | 14 years ago |glinden.blogspot.com

14 comments

order
[+] eggbrain|14 years ago|reply
I know this is just a demo project, but I thought the game was broken at first, since the portal gun didn't seem to do anything. It isn't until the third level that you can actually use the portal gun, and then you can only use it on the non-boundary lines (as in, you can't use the ceiling or the walls).
[+] arundelo|14 years ago|reply
I figured it was broken (on my browser) too, and I didn't know how to get to other levels. After seeing your comment I went back and saw that touching the rectangle with the yellow glow takes me to the next level. (On the first level this requires a jump, which is done with the up-arrow key.)
[+] danneu|14 years ago|reply
I appreciate the information the author shared in the blog post instead of just linking us to a game without any context.

For instance, he points out that the source demonstrates how to use Box2Djs for physics, handling touch/multi-touch/accelerometer, and auto-resizing the canvas.

It went from something I'd play around with for a couple minutes to a bookmark & a repo I'm now following. Thanks for the extra effort.

[+] gramsey|14 years ago|reply
Very clever implementation. One thing I would comment though is, it's rather irritating to have the figure constantly moving left or right. It think it would be better if the figure stopped once hands were released from the keyboard.

Not sure if that's the intended functionality, but that's what happens in Chrome for Mac Version 20.0.1132.17 beta.

[+] mratzloff|14 years ago|reply
The entire game works properly for me in Safari for Mac. The figure only moves when you press AWSD or the arrow keys.
[+] singular|14 years ago|reply
Very cool. But having issues in chrome/mac with the portal gun not shooting anything. Works fine in safari/mac.

Note: this applies even at and beyond the 3rd level where it is first useful.

Additional edit: I want to emphasise how very cool this. I wouldn't want anybody to think that my criticism is all I have to say about it. Great work!

[+] jacktoole1|14 years ago|reply
Working for me in Chrome/Mac (not disagreeing, just adding this if the author is trying to debug it. Or maybe he already has :) ).
[+] kristianp|14 years ago|reply
ASWD have no effect for me. Chrome 19 Linux.
[+] willlll|14 years ago|reply
"503 Over Quota This application is temporarily over its serving quota. Please try again later."

It is a shame he hosted this on a provider that has such limits.

[+] justinhj|14 years ago|reply
Wherever he hosted it would have some limits. It's a learning project that made the front page of HN :)
[+] ilaksh|14 years ago|reply
Its not giving me that. Did you try refreshing?
[+] nfarina|14 years ago|reply
Amazing! It worked perfectly on my iPad and I was able to figure it out quite naturally. Really impressive for a "demo project."
[+] veyron|14 years ago|reply
Absolute agony on the iPhone. But that's attributable to limited phone input (not to impugn the developer)
[+] pacomerh|14 years ago|reply
Great flow, I'm going through the CoffeScript file and I'm loving how this was put together.