Using this pack you are encouraged to have several scenes in your game. The sample game alone has 51 scenes, so I included save, load and scene switching features.
Saving and LoadingThis pack comes with a behavior to store the player's actor type, the scene where the game was saved and the player's X and Y position on that scene. You can also specify a scene or position to save instead. Saving is done with an actor designated as a save point, by attaching the behavior “Save Point” to it. You have the following save options:
- Collision: automatically saves when the player collides with this actor.
- Control: saves when the player presses a key while colliding with this actor.
- Region: automatically saves when the player enters the specified region.
- Scene: automatically saves when the player enters the scene.
- None: can only save by receiving the "Save" trigger.
"Player" is defined as any actor of the specified "Player Group" in the behavior. You can also save by calling the trigger “Save” for the save point actor, which will automatically retrieve the player actor using a “for each actor of [actor of group]” loop if no player was detected previously. This also calls the trigger “Save”for the "Save Status" behavior for the player actor (from my other resource packs) , saving its configured attributes and actor values.
Loading is done with the “Load Game” scene behavior. To make use of it, you must use the trigger “LoadGame” for that behavior during a moment appropriate for you game. The load will register a fail if the game wasn't saved previously. In the sample game, an actor calls the “LoadGame” trigger when clicked on.
Scene SwitchingI included a simplified version of the behavior used for switching scenes from the Cutscene Pack. It comes with the relative position feature when switching scenes using regions, which makes the player's position in the next scene change based on where in the region the player entered (works for both horizontal and vertical scene switch). You can also use this for door-like scene transitions, but it does not include an open/locked state like in the Cutscene Pack.
For the sake of having this resource pack completely stand alone, I also made the "Preserve Momentum" behavior. It's a super simplified version of the Save Status behavior that only saves the actor's momentum and layer. If you plan on using this with any of my other packs, you can use Save Status instead.
One important thing to know about scene switching is that your player actor should
not be placed in the scene designer. Instead, it should be created at runtime. Otherwise, you will end up with two instances of your player actor in the same scene.
Cutscene Pack IntegrationThere are pre-made block combinations in a specific behavior that you can quickly copy and paste into the Cutscene Pack behaviors to have script events to alter map data in your game. These can be used to easily mark an item as collected on the map, or a boss as defeated.
Progress ReportWritten documentation, behaviors and sample game are all done. Some unplanned features were also added as I compared what I have with other games. Next I'll start making video tutorials for all my resources, and the video for the map system is the third one I have planned. This pack will be released once that video is done.