I know there are some scripts that allow you to create a local map of your area but I decided to write my own since the super large map was down.
I intended this program to be very basic. It uses a single flat text file to track your images and it creates one large map out of Ender style minimap images. I intend to polish this program to a great deal yet but this is the result of my programming efforts this evening and it at least works so I figured I would get it out to you guys now.
All that said the code that I am building is going to eventually be moved to a web server and allow you to submit your maps and receive a report about which of your maps were applied to my master and where those pieces fit into the puzzle. Using the report I then provide it would allow everyone to quickly find out where they live.
HOW THIS PROGRAM WORKS
1 file is the most important. That is main.php. The most important thing to do is to update the $ender_maps variable to reflect your maps folder. Look at the example. This has been tested on and it works for MS Windows and Linux.
This program is currently setup to make "sweeps" through your maps directory. It's first sweep it runs a create_db session. It looks through your maps directories from oldest to newest and inside that looks for your tile_0_0.png it then looks at that 0_0 to make sure that it has 4 adjacent minimap images to it. Once it finds that it creates the base image/map. From that point on each time you execute the program it will look through all your maps files for matches with just 2 adjacent images. Why do I require 4 the first time? To establish a good base for your future additions of course. Why do I require 2 adjacent images to any new one in order to be added? This allows me to just automatically expand the map. I do not then have to have the user approve any changes or worry about fuzzy matches making areas inaccurate. That said if you run the program once your map will seem small. With each run after that your map will grow until it has all matches accounted for. You will need to execute it yourself it does not loop at the moment. For now it's best to schedule the program to run using either MS Windows built-in scheduler or cron on our Linux boxes.
OK ALL THAT IS GREAT BUT HOW DO I ACTUALLY RUN IT
extract the files
set $ender_maps variable
php main.php
THINGS I AM AWARE OF AND THAT I WILL BE WORKING ON
Please remember this is literally the first working release I have. I'm releasing it as is that said here is what I am looking as far as must haves to be done yet:
- Control old and new files so you're map always reflects the most recent minimap image for a true grid. This will be done by looking at the creation time of the file and adding that to the DB along with an Active column to show if the image is in use at the moment. I will also need to implement a different file name tracking system. The idea is to make the application responsible for changes so I or you could look and see what image replaced what image in the process of execution. In order to this I will also then make all PNG files in master named <THEIR MD5>.png and the last process of the script will be responsible to build a map directory with traditional tile_x_y.png named files so you can use the map.html to view it. I will update currentsession.js when I make that change naturally.
- Whatever else I can think of while I get it up to a web server standard and get a global map published to you hearthlings
CHANGES MADE SO FAR (Download the .zip again if you have it already to get the changes)
- Now should execute on Linux OS's (damn \ vs /)
- Added a run.sh for those folks to lazy to open a terminal and type php main.php ... cough me
Screen Shot Walkthrough: