This example shows how easy it is to clone maps with the SwapMaps library. You can dynamically generate maps from templates, randomize them, delete them, and teleport between them.
2/20/2012 - v1.1
- Minor tweaks to clean up source code per feedback.
|
||||||||||||||||||||||||||||||||||||||

2. It would have been nice to have a stat panel showing the current set of maps. Maybe list each z level that exists and indicate which one you're on.
3. You use a lot of hardcoded values, like 10 as being the size of the map.
4. For how you're using it, prob(50) makes more intuitive sense than than pick(0,1).
5. The Mob_- and Proc_- prefixes are wildly unncessary.
6. Some of your variable names are overly elaborate, like "iUserProvidedZLevel". For a local variable in a three line proc a one-letter name would have been sufficient. There's also "listOfTurfsInView" in the Proc_ResetToGrass proc which is overly elaborate and not even used =)
7. Your usage of whitespace isn't consistent. Sometimes you put spaces after commas (ex: "locate(1, 1, m.z1)") and sometimes you don't (ex: "block(locate(1,1,z),locate(10,10,z))").
8. You usage of semicolons is not very consistent. If it's a habit left over from another language they'd be more consistent.
It's great that you've developed your own programming style but it's often detrimental. If you think it works for your personal projects that's fine, but it shouldn't get in the way of putting together a decent demo.