Jump to content

HTML5 Canvas Tile scroll


vsys
 Share

Recommended Posts

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!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...