Hello,
I 'm french so sorry for the mistakes… ,
I’m beginner in json and try to make a game board with json, I have my map (table of numbers) in json and my js file:
$.ajax({
url:“json.json”,
type:“GET”,
success:function(data){
console.log(data.Map);
},
error: function (jqXHR, textStatus, errorThrown){
alert(textStatus + errorThrown);
}
json:
{
“Map”:[
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0],
[0,0,0,0,0,0,0,0,0,0,0]
]
}
How to display the board in my web page …? I need to know also how to display pictures (characters and weapons) randomly on the board, can you help me please !! (I have to use constructor …)
I am looking for good tutorials to create games in 2D in js …
Thanks a lot!!