-
Notifications
You must be signed in to change notification settings - Fork 58
Modern Map
Modern Map extension takes inspiration from modern metroidvania titles like Ori and GRIME. It changes the map to be discovered per-pixel like in these games and cells can display detailed room previews instead of plain color/patterns. The system is specifically inspired by ENDER MAGNOLIA: Bloom in the Mist, which features a detailed map, but embeds it into confined rectanglular rooms. This allowed to integrate it into the existing grid-based system.
See extensions section for instructions on how to install it.
This extension is designed for EM map theme. When you install, the configuration will use it by default. Also it enables discover_whole_rooms
setting. The modified map looks like this:
Major feature is that the rooms can be discovered partially in a "fog of war" fashion (in the extension called "fog of mystery").
Also the map cells display accurate preview of the room. This is not exactly built in - the previews are generated externally and only fed to the system. There is however a script that allows generating the previews (called "overlays" in the system).
While Modern Map does much of the work automatically, it requires a bit of manual setup.
First thing is that it needs overlay images for every room. By default you can find them in SampleProject/Sprites/Overlays
folder (this can be configured by modifying FogOfMystery.gd
script). Overlay is a representation of the room's content. While any size will work, it's best to keep them in the same ratio as cells. You can generate overlays using GenerateOverlay.gd
script or GenerateAllOverlays.gd
to generate overlays for all registered rooms. They are EditorScripts, you run them via "File -> Run" menu option in Script Editor. The generator comes with some configuration and includes a documentation, so be sure to read it. The final goal is that each registered room has a corresponding overlay file, e.g. StartingPoint.tscn
requires a StartingPoint.png
file in the overlay folder. It will be displayed on top of the map cells, as presented above.
Another thing is that, due to how MetSys works, you need to assign a special custom element to each of your rooms. The element is called "overlay" and you need to draw it as a rectangle for each room.
The origin of the overlay has to be in top-left corner of the room. Matching room size is technically not a requirement. The custom elements script will then use FogOfMystery
script to draw available overlays and handle their discovery automatically, using lots of magic.
This is enough to use the system, but in some cases you'll need some extra steps to ensure everything is working. Refer to the next section, which highlits all changes in sample project.
This section describes how Modern Map alters the Sample Project.
From important changes, some maps and objects had to be modified to make sure that proper overlay is displayed. E.g. in Portal.gd
there's this bit:
# Reguired to unblock Fog of Mystery.
FogOfMystery.fom.pre_new_room(target_map)
This is required when teleporting to rooms by loading the map directly. This might be improved in the future, but for now you have to manually let the system update.
The Dice Room is gone and so are procedural rooms. Displaying them properly would require dynamic overlay generation (which is possible though, as the generator script takes less than a second to run), and perfectly, some way to share overlays if rooms are the same.
From less important changes, the full map available in-game under M key is enhanced. It now displays whole world and can be scrolled (as opposed to moving the character in the background). For this to work, the map uses MiniMap.gd
as base and is big enough to display everything. Instead of following the character, it's manually positioned when you open it. Refer to FullMap script in Map node in Game.tscn
for implementation details. The minimap is also slightly altered; it has a background panel.
From least important changes, the "delta vector" feature is gone.
As mentioned before, the system requires that you setup a custom element for each room and explicitly tell the system when player is teleporting. Also there are no symbols. While it's possible to use the default symbols, they will display in the center of the cells, which is not ideal. Pefectly the symbols should display at the object position in the cell, with support for multiple symbols per cell. This might be improved in the future.