New Updates:
1) Replaced Prototype with Mootools.
replaced
Event.observe(window, 'load', function() {
new Effect.Move('demo', { x: pX, y: pY});
with
window.addEvent('domready', function(){
var mover = new Fx.Move($('demo'), {
relativeTo: $('grid'),
position: 'upperLeft',
edge: 'upperLeft',
offset: {x: pX, y: pY}
});
mover.start(); //moves to the new location
check_world()
});
This reduces the size of the javascript libraries and moves to the officially supported mootools. I only used prototype because it was the first result in google that worked for me when trying to move the main characters div.
One result of this is that pX and pY are absolute values now instead of relative. We'll see what other advantages mootools has to offer over the coming weeks. I particularly like the ability to centre one div over another. This could be a way of clicking on a square and have a character move to that square.
2) Introduced Json to update non-player character positions.
javascript:
function check_world(){
var a = new Request.JSON({
url: "index.php?option=com_battle&format=raw&task=listStuff",
onSuccess: function(result){
var i=0;
while (eval(result[i].id) > 0){
Move_Char(result[i].id,result[i].posx,result[i].posy);
i=i+1;
}
}
}).get();
get_players();
} // end if check world
while (eval(result[i].id) > 0 is not cool.
when (eval(result[i].id) runs out we get an error. Need to find alternative loop and clause. (though it works for now).
php (in controller)
function get_players() {
$db =& JFactory::getDBO();
$user =& JFactory::getUser();
$db->setQuery("SELECT map,grid FROM jos_jigs_players WHERE iduser =".$user->id);
$result = $db->loadRow();
$map = $result[0];
$grid = $result[1];
$db->setQuery("SELECT jos_jigs_players.iduser,
jos_jigs_players.posx,
jos_jigs_players.posy,
jos_comprofiler.avatar
FROM jos_jigs_players
LEFT JOIN jos_comprofiler ON jos_jigs_players.iduser = jos_comprofiler.user_id
WHERE grid ='".$grid."' AND map='".$map."' AND jos_jigs_players.iduser !='".$user->id."'
");
$result = $db->loadAssocList();
echo Json_encode($result);
}
3) Introduced Grids.
A grid is made up of 1,4,9 or 16 maps (or 1*1 ,2*2 ,3*3, or 4*4 . (n*n where n is called the grid_index)
A map is made up of 64 cells or tile spaces.
To move from map to map simply involves increasing or decreasing the map id by one if moving left to right . To move up or down from a map you increment the map id by the grid_index.
To move from grid to grid involves the use of portals. there will be three types of portal
A) Magical portals, part of the game story eg a portal at Newgrange or Egyptian pyramid.

An story portal eg The entrance to a tunnel, a bus depot , a train station.
C) A non story portal (as in the picture below) simply joins one part of a city to another unknown to the players.
All three function identically from a code point of view. I've added some code and grid columns to the players database table, but haven't actually introduced the portal code to the game yet. It is the next high priority task.
4) Introduced Community Builders Profile Page and avatars.
Changes have been uploaded to both the
eclecticmeme.com and
Github: https://github.com/Techbot/JIGS
The github files are still a bit disorganised and probably not to be trusted. It might take a week or so for things to settle into a routine