No Time To Play

Archive for May 18th, 2017

Brief guide to the 2D canvas in HTML5

by on May.18, 2017, under Gamedev

I started making web games using the 2D canvas API in 2009, early enough that people still went “I can’t believe it’s not Flash”. A year or two later, everybody and their dog was making canvas-based games, so mine weren’t special for long, but oh well. On the plus side, my skills are still entirely relevant eight years down the road — a lucky break in this world where we all have to run as fast as we can just to stay in place.

The canvas API isn’t exactly huge or obscure, and the Mozilla Developer Network covers it well. It can still be daunting to learn from scratch, especially if you don’t yet know what you’re going to need in actual game development.

As it turns out, I only ever use about two dozen fields and methods of the canvas element’s 2D context; you may be able to make do with even fewer. Of course, that’s just for the graphics — setting up a game loop and accepting input is another story.

(continue reading…)

1 Comment :, , more...

Posts by date

May 2017
M T W T F S S
« Apr   Jun »
1234567
891011121314
15161718192021
22232425262728
293031  

Posts by month