Build a Simple Grid Game Web Base with Artificial Intellegence (AI) in HTML 5 Javascript and Jquery Run in Everywhere – Part 1

.

“WRITE ONCE IN BLOG READ ANYWHERE BY INTERNET” 😛 😛 😀

JUST TO LEARN HOW TO MAKE A SIMPLE GAME IN HTML5 JS AND JQUERY

NewBieOnly!

.

Html 5 tag that you must know it :
<!DOCTYPE html>
<html>
<head>
<title>SimpleGridGame</title>
</head>
<body>
<canvas id=”yourcanvasId” width=”480″ height=”640″></canvas>
</body>
</html>
Example of Javascript implementation:
– build 2d array in js for Grid Map
For example we make array with size : 30x10var map1 = [
[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,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0],
[0,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,0],
[0,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0],
[0,2,1,2,0,2,0,2,0,0,2,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,2,1,0],
[0,2,1,2,0,2,0,2,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0],
[0,2,1,2,0,2,0,2,0,0,2,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,2,1,0], Continue reading

PHP(1)

What is class and object in PHP ?

PHP is powerfull programming language, and now also can be applied object oriented concept, same with java or other oop. Therefore if you ever studied java or other oop, you can mastering this language easily.

example:

<?

class Human{

var $eyes = 2;

}

$david = new Human(); Continue reading