NEW: zoom in and out with W and Q keys! (see https://scratch.mit.edu/discuss/topic/272731/ ) Scroll the map around using the arrow keys. See inside for the object location API. (THIS IS NOT COMPLETE: I don't yet position objects on the zoomed map correctly and it jumps more than you expect if you zoom after scrolling much...(because it is zooming based on a center of 0,0 rather than the actual center of what is currently displayed) This was just a quick proof of concept... It works OK if you just zoom first then scroll...)
Map generator uses components from @LocoMule and @DadOfMrLog. This is a trivial implementation of a 2D data structure. It is implemented using a linear list, which will be quite slow if there are a large number of objects. Can you make it significantly faster? Perhaps by using quad trees? btw this scrolling demo uses an adaptive speed algorithm to make the scrolling look faster than it really is :-) (Once it speeds up, it jumps by whole tiles rather than pixel positioning) The objects are all different costumes of a single sprite.