V3ct0r 2,145 Report post Posted April 17, 2022 Tool for compressing .map files When working with the YAMMI map editor, there may be a problem that the output .map file will be very large. For example, if you open the map darkblue.map (Deep Blue) in YAMMI and save it to disk, then the size of the map will be about 240 MB, instead of the original 46 MB! This is due to the fact that most of the darkblue map is occupied by the sea, i.e. essentially the same cells that do not differ from each other, and such cells do not need to be written to the .map file - the game client will automatically replace them with water when rendering, but YAMMI does not use this optimization and still writes "empty" cells to the output .map file. This tool solves the problem described above and allows you to significantly reduce the size of .map files on disk after they have been edited in YAMMI. To do this, the program looks for "empty" cells in the .map file and removes them from the file. Download 1) The tool (pkodev.tool.mapcompressor.exe); 2) Source code (C++). The tool is a console program, so the paths to the source and output .map files are passed through the startup parameters: > pkodev.tool.mapcompressor darkblue.map darkblue_c.map darkblue.map is the uncompressed .map file that needs to be reduced; darkblue_c.map is a compressed .map file after being processed by the program. The output of the program will be something like this: PKOdev.NET .map file compressor program Version: v1.0.0 (03/01/2022) Author: V3ct0r Input .map file: darkblue.map Output .map file: darkblue_c.map Input .map file information: * Width: 4096 * Height: 4096 * Section width: 8 * Section height: 8 * Sections number: 262144 Please wait . . . Done! * Sections compressed: 222007 * Percentage: 84.69% * Bytes freed: 213126720 As you can see from the output, the size of the .map file has been reduced by about 203 MB! Attention! At the moment, the program has not yet been properly tested, so after compression, certain errors may occur on the maps. Keep this in mind when working and keep backup copies of the original .map files. 2 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Graf 217 Report post Posted October 24 (edited) @V3ct0r Добрый вечер. Спасибо за этот пост, я уже переписал компрессор карт и распаковку мини-карт на C#)) И вот я задумался.. Еще же есть Yummi. У тебя нет его исходников или чего-нибудь подобного? Хочу добить все это и сделать 1 проект для полноценной работы с картами. Edited October 24 by Graf Quote Share this post Link to post Share on other sites