-
Notifications
You must be signed in to change notification settings - Fork 76
Quick Start
To start the sample project, simply unzip it and open project.godot in Godot editor. Do not run the example project from AssetLib download as it skips some configuration files. It's better to download the ZIP from GitHub. Note that the editor will restart after first launch, because the plugin needs to be properly set up.
After adding the plugin and enabling it, a file called MetSysSettings.tres will appear in your project. It contains settings for the plugin. You can move it to any directory, but you should modify addons/metroidvania_system/settings_file project setting to point to the new path (make sure to enable Advanced Settings to see it). Next thing to do is edit the settings file and customize all the fields (see here for more info). The most important one is map_root_folder, which defines where will your map scenes go. This is also the location of your MapData.txt file, which stores the world layout.
Create your map layout in the Map Editor and assign the scenes from your map folder. Every room should have instance of RoomInstance.tscn scene to properly tie it to the system. When you start your game in such scene, MetSys will automatically detect which room you are in and the position tracking will handle the rest. To draw the map use MetSys.draw_cell() method. See here for more info.
For convenience, MetSys comes with some scripts that can be used as basis for running the game. The easiest way to start is using them. Your main scene should inherit/include MetSysGame.gd located in Template/Scripts folder. That class is responsible for game and map management. Whenever you start the game, you should call MetSys.reset_state() and MetSys.set_save_data() to make sure the singleton is in the initial state and save data exists. Then set your player node with set_player() and use load_room() to load a scene. For room transitions, you can add transition module (using add_module("RoomTransitions.gd") in your game script). Refer to system template section for more info.
If you don't want to use the provided scene management system, you can make a custom one. Check here for info on how to manually track player position.
These are the basics that allow you to craft the world and move within it. For more information read this manual and/or the documentation.
Exporting the project is the same as normally, however remember to include *.txt in the include filters of Resources tab. Map data is stored in this format.