17Oct/1012
grid view
I've finished the grid view.
It is based on AJAX, meaning that no page refresh is required to move about the grid.
It will need some tweaks once the nodes (towns) come into place.
And here are the files: devanaFiles.zip
the economy »
« the grid

May 26th, 2003 - 13:31
Very good peace of code… I can see that this will be very good.
I was looking in code for some security flaws and it is much better than before but i suggest u to make one edit of login.php with remember cookies… u set in value direct $pass and that is not so good because some “evil” people can read cookie of user and get pass, better md5-it and then set it in cookie…
so
setcookie(“devanaPass”, $pass, (60*60*24*30+time()));
set to
setcookie(“devanaPass”, md5($pass), (60*60*24*30+time()));
sure, u need edit some more code for make it this way….
and i see good, foreach ($_POST as $key=>$value) $_POST[$key]=misc::clean($value);
but clean the cookie input too… Hope I helped a bit…
October 17th, 2010 - 21:26
It’s great!
October 20th, 2010 - 14:56
Nice work, but where is the sql-dump?
October 20th, 2010 - 18:52
Forgot about that. You can use the sql file from the previous post. It’s the same here.
November 2nd, 2010 - 12:29
good job, but I still insist that the map should be flat and not more 2D grids
November 24th, 2010 - 22:17
@Gexx: Thanks for the tips. I’ve implemented them. Very useful stuff indeed.
November 27th, 2010 - 22:29
I’m study solution for use key arrow by my keyboard pc in ajax sript…because in other game the map is scrolling by arrow key…..bye friend
November 27th, 2010 - 22:51
This is a good javascript example for table
http://www.daniweb.com/forums/thread228795.html
December 14th, 2010 - 21:57
Hi Andreu, by my promise,
if after enter this javascript, in grid map use keyboard arrow key:
“;
break;
// Freccia sinistra
case 37:
location.href=”getGrid.php?x=”.$x.”&y=”.($y-1); ?>”;
break;
// Freccia destra
case 39:
location.href=”getGrid.php?x=”.$x.”&y=”.($y+1); ?>”;
break;
//freccia giu
case 40:
location.href=”getGrid.php?x=”.($x+1).”&y=”.$y; ?>”;
break;
default: void(0);
}
}
–>
December 14th, 2010 - 21:59
This up javascript enter after close body at call grid…the superior primary file ok? Try and devana use arrow key for move map by keyboard.
December 2nd, 2011 - 22:45
the map is empty for me… where is the problem??
December 8th, 2011 - 00:20
Hello,
A big thank you for your work, I downloaded the 1.66 version of Gameforge.
I’ll install it and ask myself a question:
The files that you’re proposing here, are to copy over the old files? or should they be integrated differently?
All ZIP should be download? or the last is the final?
thank you