Devana how a browser game is made

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

Comments (12) Trackbacks (2121)
  1. 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… ;)

  2. It’s great!

  3. Nice work, but where is the sql-dump?

  4. Forgot about that. You can use the sql file from the previous post. It’s the same here.

  5. good job, but I still insist that the map should be flat and not more 2D grids

  6. @Gexx: Thanks for the tips. I’ve implemented them. Very useful stuff indeed. :)

  7. 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

  8. 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);
    }
    }
    –>

  9. 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.

  10. the map is empty for me… where is the problem??

  11. 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


Leave a comment

(required)

*
= 3 + 1