Map Handling

by AJX
Lib for saving/loading maps quickly and efficiently
ID:110843
 
This is a piece of code I have used in a few little projects for dynamically saving/loading maps at runtime. I personally find it useful so I decided to release it publicly.

Basic summary:
- Saves maps in a text format
- Can *NOT* handle more than 255 different types*
- Saves/Loads 100,000 objects and 10,000 turfs in approx. 2-3 seconds
- Stores 100,000 objects and 10,000 turfs in approx 100 KB savefile
- Does NOT save variables, only base atom types

*: Map Handling Extended (included inside) can handle up to 65025 types, but it is slower/less efficient.

Blah blah blah, free to use, please give credit, etc.


Version History:
0.2: Added Map Handling Extended... This allows for more than 255 different types to be saved. However after stress testing I discovered that this method of saving is extremely less efficient and should probably be avoided at all costs. I'm releasing it so it is there, but it really isn't all that useful.
0.1: First release
Very helpful.
The code contains a very annoying bug: It doesn't use the z-level you supply, instead it always uses z-1. In other words, it will break on you if you have more than one z-level, and you will waste time trying to track it, so I put this comment up here.