I create a map for a browser game (strategy). The map consists of cells (tile) ... At the moment, the map is updated when you click on the arrows next to the map, the map itself is generated using a PHP cycle (all information about villages and resources on the map is stored and selected from the database) ...
I understand that to generate a map every time you update the coordinates (when moving around the map), this is a very difficult process for both the server and the client ...
Decided to change the map:
- Use AJAX (to dynamically update the map)
- Use JSON To get information about cities on the map using the API
- Use Scroll in X and Y to scroll the map along the axes (Travian used and used this system)
The first 2 points - do not cause questions at all ... That's about 3, this is a problem. First, the choice fell on the plugin Jquery Eco-Scroll.js ... But I could not find how to fasten the "initial coordinates" so as not to 0: 0 loaded, but let's say 20: 5 ... I beg you to help find solutions for implementing the card (and yes I understand that the map will transfer from isometric to 2D). The biggest plus of Eco-Scroll.js is preloading cells.



