Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

HTML5 Canvas Tile scroll

$
0
0

Dear GameDev users,

i'm new in canvas world. and i need a help.

i'm create a 300x300 tile map (with 64x64 tiles). (19200px X 19200 px)

<canvas id="entities" width="1440" height="800">Your browser doesn't support HTML5 Canvas</canvas>

Added tiles with, every colls and rows drawImage(image, x, y);

x= 0,64,128,192 …..

y= 0,64,128,192 …..

i get my map. how can i scroll in this only looking the 1440x800px content.

 

Thanks!


Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>