Search This Blog

Showing posts with label duhhhh. Show all posts
Showing posts with label duhhhh. Show all posts

Thursday, March 30, 2017

Found these two gems today (Javascript)

So I'm not some uber-JS programmer, let's just get that right out.  I know how to program and Javascript makes sense to me, until you add all those stupid extensions people throw at it like some kind of tacky christmas tree.

For a long time I've wanted to make a pure JS version of my MWDA (Mechwarrior: Dark Age) game for the browser.  However, my limitation was that I didn't understand how to get past the portion of actually outputting beyond using the alerts and stuff built into JS.

Enter the canvas element.  A cursory search today revealed an incredibly simple fix for this conundrum:

https://developer.mozilla.org/en-US/docs/Games/Tutorials/2D_Breakout_game_pure_JavaScript

And:

https://www.w3schools.com/graphics/canvas_reference.asp

So the canvas, which is apparently a newish HTML element is one that is specifically made for people trying to do what I'm trying to do. Which makes it perfect for this iteration.   You basically get a blank drawing space.  I feel kind of dumb for not finding this before.  So when I've got time and I don't feel like reading RHEL Clustering Tech manuals, guess what else I'll be thinking about?