Battle Canvas

After doing some more research I did actually find three virtual tabletops that work in the browser: Flash-based Battle Map, RPGtonight and AjaxVTT. The last one seems to be a dead project. There seem to be at least one more Flash based application in development that might provide VT functionality. Battle Map is just what the name says, a bare bones map for putting some markers on. RPGtonight looks to be a pretty full featured VT. I found these from Battlegrounds, which offers lots of links to computer aided table top role playing. As far as I can tell, none of them use the canvas tag.

I have never done anything with the canvas tag myself, so I started doing a little research. To start with, I created a little canvas with a grid, put a marker on it and placed a draggable area effect on it. The canvas API is pretty limited, consisting of basically just drawing functions. It is nice that it offers support for alpha blending, which makes it trivial to draw the area effect in my sample. Drag and drop required doing hit testing and erasing and redrawing everything on movement. Would be nice to get a library to do this kind of thing.

Mozilla offers a great canvas tutorial, and the WHATWG spec has the details. I got the idea for the drag and drop from this blog.

Here’s the beginnings of my Battle Canvas.

Similar Posts:

    None Found