javascript - Canvas Isometric game engine - moving the map -


i have been working through tutorial (http://glacialflame.com/category/tutorial/) build isometric game engine, map move character focus point.

so, when move - map centres on character.

i have little pastebin here: http://pastebin.com/u75pz4yy

see in action here: http://www.wikiword.co.uk/release-candidate/canvas/newengine/index.html

have fiddle, request! http://jsfiddle.net/neuroflux/vuxyg/2/

note: html5 , canvas browsers only, don't moan if using ie6 ;)

any ideas , appreciated, thought updating each of "tiles" in array +1 or -1 respectively, can't seem foreach loop tile images on canvas.

cheers in advance!

moving map should simple translating context players position.

as player moves x or y, should canvas translate same amount (or negative amount)

i didnt bother finding right offset make bunny in center of screen, should give idea of how done.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -