How can I draw on canvas with 2d array | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I draw on canvas with 2d array

Array 2d

23rd Sep 2019, 5:29 PM
SCP 251
SCP 251 - avatar
4 Answers
+ 1
I'm not sure if you are wanting to make games but this demonstrates what you are asking for. "This is not my code". https://code.sololearn.com/W9BB0i330wVN The source code comes from http://technologies4.me/articles/tile-map-canvas-javascript-a1/canvas-tile-map-source-code-p2/
23rd Sep 2019, 8:39 PM
Anthony Johnson
Anthony Johnson - avatar
0
I don't really understand here gameMap[((y*mapW)+x)] in the code
23rd Sep 2019, 10:18 PM
SCP 251
SCP 251 - avatar
0
There is a video on that website. He explains everything.
23rd Sep 2019, 11:17 PM
Anthony Johnson
Anthony Johnson - avatar
0
Join to learn canvas. Just started https://youtu.be/VBa-7NuJlAI
27th Sep 2019, 10:27 PM
Qudusayo
Qudusayo - avatar