I'm working on a canvas-based game myself. There are lots of newish engines about that you could start with or learn from if you decide to go that route. Also, there's no reason you couldn't combine the two techniques. For instance I've considered using divs for the underlying tile map and placing a canvas on top for effects.
One advantage that canvas has apart from anything technical is that you can use many of the techniques that have been developed by game developers in the past, especially those pioneered when computers had a lot fewer resources. Compositing and transformations allow you to use a lot of those techniques. The reason I'm using canvas primarily is because it allows me to do shadows, lighting, particle effects, and neat tricks like like rendering elements with transparency. There's also the fact that I can limit how many images the browser has to download (and I have to create) by having the browser take one sprite sheet and create new ones with different tinting, etc. Lately I've been playing with using the mousewheel for zooming and dynamically rescaling everything in the drawImage() call. The main thing I've learned is to limit how often you call drawImage(). -- To view archived discussions from the original JSMentors Mailman list: http://www.mail-archive.com/[email protected]/ To search via a non-Google archive, visit here: http://www.mail-archive.com/[email protected]/ To unsubscribe from this group, send email to [email protected]
