Thread: Canvas Problem
View Single Post
Old 12-05-2012, 10:02 PM   PM User | #42
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,210
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Well sure. Esp. if you are creating the game background via some server-side code (PHP/JSP/ASP/etc.) it would make more sense to just generate a bunch of <img> tags inside a <div>. Done correctly, the images would automatically show 10 per row.

The only reason I could see to use canvas like this (and even then I'm not sure it's a better choice then <img>s in a <div>) would be because you are downloading new maps via, say, AJAX and/or you are generating the maps using logic (semi-random??) in JS code.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote