For player 2, 'J' goes up, while pressing 'L' goes to the left from the perspective of the paddle. This feels like made in purpose to hurt vi users.
WebAssembly COBOL Pong
21–30 of 36 posts
Re: WebAssembly COBOL Pong
#22Re: WebAssembly COBOL Pong
#23Next step: both users playing over the network?
Re: WebAssembly COBOL Pong
#24This is sweet! Interestingly it seems to only accept QWERTY input even when the keyboard has an alternate mapping set. This makes sense though given the positions of the keys chosen
Re: WebAssembly COBOL Pong
#25The ball doesn't seem to bounce "properly" - i.e. upwards if it lands towards the top of the paddle and downwards if it lands towards the bottom of the paddle.
Re: WebAssembly COBOL Pong
#26See also, using COBOL with Cloudflare Workers (via WebAssembly): https://blog.cloudflare.com/cloudflare-workers-now-support-c...
That was an enjoyable read, thanks.
Re: WebAssembly COBOL Pong
#27It seems very hard :-) Not the COBOL.
Re: WebAssembly COBOL Pong
#28Neat! The actual COBOL is pretty minimal, just tracking where the balls and paddles are and then calling out to update the DOM. It doesn't look anywhere near as horrific as I would have expected :) https://github.com/moxon6/cobol-js-emscripten/blob/master/co...
My take is that people who fear COBOL probably haven't seen pre-ES5[0] JavaScript.
[0] While ES2015 was a major leap in and of itself, it wouldn't have happened had ES5 not laid the groundwork by introducing "minor improvements" that we now take for granted like JSON, strict mode and Function.prototype.bind to name a few.