this is my first post here, so.. be gentle :D
So guys, I am working on a small browser game, and I started with the tile based map. It will be quite a big map, 1000*1000 tiles, at least.
I tried a few methods of taking the map from the database. For example, I load 12*12 tiles, just to cover the screen, and then when the user dragged the map, it was loading more rows/columns from the database through ajax and deleting the opossing ones. But this is very slow method even on localhost.. I can't imagine how it was on a real server.
I read about more techniques like using pseudorandom number generator, random seeds etc but I don't think they fit this type of situation as they complicate things.
So I was thinking of using php socket. I am already using php socket in other projects and they are pretty reliable and fast.
I will take all the map from database and put it in a big 3 dimensional array on a single machine, server. And then through sockets users will take their maps, new rows/columns etc.
Have anyone used sockets for this task? Or is there something even better? I am kinda frustrated with the results I gained with ajax and am really looking for a fast solution.