Interface Minimap

by DarkCampainger
Place a Mini-map on your players' screens with just a few lines of code
ID:101073
 
This library lets you define your minimaps and then easily activate and deactivate them! No changes to your interface file required!

Want to have two minimaps open at the same time? No problem! Want 300? Even better!

The implementation is feature-rich and offers many ways to customize your minimap. Put a background image behind your minimap, surround it in an image-based frame, place static markers over it, and add extra-large landmark icons to the map!

Easily position, size, and anchor the minimap. Built-in minimap image generator creates maps for you, or you can use a pregenerated image.


Credits:
The included demo uses icons from Karnlor's Public Graphic Resource and a map image from World of Warcraft.

Update History:

Version 2 (7/30/11)

Implemented dc_MinimapPrefix for generated interface control names

Set dc_GenerateMinimap() to run in the background

Added dc_MinimapState and dc_MinimapPriority for map generation to all atoms, instead of just turfs

Version 1 (8/29/10)

Note: Because resolutionX/Y were renamed, if you altered them in any way you will need to update them to scaleX/Y

Note: scaleX/Y added to the paremeters of dc_Minimap/New(). If you passed parameters by position instead of name, you may have to fix them.

resolutionX and Y renamed to scaleX and Y

Can now set imageWidth/Height OR scaleX/Y

hideEdges property added to dc_Minimap which prevents the Minimap from showing the area beyond its edges

Cleaned up comments in MiniMap.dm

DEMO: IslandSOS Minimap now uses scaleX/Y instead of imageWidth/Height

DEMO: Made Runners not dense

DEMO: Shifted Worldmap Minimap position so padded border was not hidden
Great demo/library.
Absolutely Brilliant! Thanks a ton!
Already started implementing into our own game. Nice job!
Like a boss!
Very nice, easy to use. One question- is there any way to add an option to flip the map 45 degrees or so for isometric mode?
Jmurph wrote:
Very nice, easy to use. One question- is there any way to add an option to flip the map 45 degrees or so for isometric mode?

Unfortunately, not at the moment. I suppose it wouldn't be too hard to convert the coordinate systems, but the "viewport" of the minimap will still be a square. If you're interested, I can add it.
I think that the viewport being a square wouldn't be a problem as the "diamond" tile lineup in it would be closer to the actual directions in iso mode.
Been playing with this a bit and it seems that if you assign mobs a dc_MinimapState, they draw on the map only at their initial location and do not move on the minimap or go away when deleted.
It looks very good to me.
My only gripe is its overwhelming if you just want to take a quick look at specific parts.
I guess I'll get there eventually :)

~However if anyone's able to direct me to where the map refresh procs are, and how to set up my minimap @ compile time, I'd very much appreciate it.

Ironic - the simpler way is harder :\