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

Shift the Map Display on Canvas HTML5 and Javascript using Translate Offset & mouse click-move

At this part we will begin make a simple grid game map with html5-JS-Jquery for shift the map display using mouse click and mouse move.Translate map used to large map that the screen can not display all .. .. ..

index.html

<!DOCTYPE html>
<html>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”minimum-scale=1.0, width=device-width, maximum-scale=1.0, user-scalable=no”  />
<title>ShiftMapDisplay</title>
<script type=”text/javascript” src=”js/jquery-1.7.2.min.js” charset=”utf-8″></script>
<link href=”css/jquery.mobile-1.1.0.min.css” rel=”stylesheet” type=”text/css”/>
<link href=”css/jquery.mobile.theme-1.1.0.css” rel=”stylesheet” type=”text/css”/>
<link rel=”stylesheet” href=”style.css” type=”text/css”>
<script src=”script.js” type=”text/javascript”></script>
</head> Continue reading

BASICS OF HTML 5 JAVASCRIPT CANVAS

TRY To Do IT !!!

index.html code:

<!DOCTYPE HTML>
<html>
<head>
http://script.js
<style>
canvas {
border-width: 1px;
border-style: solid;
}
</style>
</head>
<body>
<center>
<canvas id=”canvasId” width=”640″ height=”480″>
</canvas>
</center>
</body>
</html>

script.js code:

//make a line

window.onload = function(){
var canvas = document.getElementById(“canvasId”);
var ctx= canvas.getContext(“2d”);
ctx.moveTo(10,10);  //x,y is start point
ctx.lineTo(100,20);  //x1,y1 is end point Continue reading

Easy menu with Css and Javascript

Save the code with name SpryMenuBar.js

var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {};

// SpryMenuBar.js – version 0.12 – Spry Pre-Release 1.6.1
// Copyright  (c)  2006.  Adobe Systems Incorporated.

Spry.BrowserSniff = function()
{
var b = navigator.appName.toString();
var up = navigator.platform.toString();
var ua = navigator.userAgent.toString(); Continue reading

Hebb Rule and Perceptron Algorithm

My Hebb Rule and Perceptron Algorithm Program

Download click this

Hebb Rule

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim x1(3) As Integer
Dim x2(3) As Integer

Dim i As Integer

Dim t(3) As Integer 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

Welcome to my blog

Let me introduce my self, my name is Ignatius David Markal, I live in Yogyakarta, Indonesian. If you ever in Yogyakarta, you must agree with me about my place. Yogyakarta is wonderfull city in Indonesia, Why? You must come here.