|
ArticyXImporter
ArticyXImporter for Unreal Engine
|
The Maniac Manfred demo project showcases how articy:draft and Unreal Engine work together to create a playable Point-and-Click Adventure game. Originally designed as a reference project, this demo provides a practical guide to using articy:draft for planning, designing, and creating a game, and using Unreal Engine to bring it to life through the ArticyImporter plugin.
While the project demonstrates many of the typical features of an adventure game, it is not a fully optimized or polished product but rather a proof of concept and learning resource.
To get started, ensure that you have the necessary tools and files:
You only need the articy:draft Maniac Manfred project if you want to make changes and re-export data into Unreal.
The Maniac Manfred demo's main goal is to demonstrate how to use articy:draft to plan, design, and create a game, and how to integrate this into Unreal Engine using the ArticyImporter plugin.
Each scene in Maniac Manfred is represented as a Location in articy:draft. The designer used zones within each location to create clickable areas. These zones define the interactive parts of the scene, such as doors, characters, or items. For instance, the first scene places the protagonist, Manfred, in a cell, where clickable zones trigger interactions with the environment.
Links in the scene allow the designer to reference other objects or scenes, such as linking a door to a hallway.
Each clickable zone uses a custom template called InteractionZone, which defines the behavior of the zone. This template includes:
Location generation in Unreal Engine is handled by the ULocationGenerator class, written in C++. This class automates the process of creating game objects based on articy:draft locations. It populates the scene by generating actors for each zone, attaching the necessary components for interactivity, and applying any custom logic defined in the template.
Dialogues are implemented using Unreal Engine’s UI system with panels and text elements. The dialogue system allows for branching conversations, where player choices influence the direction of the dialogue.
The SceneHandler class handles dialogue and scene transitions. When a player clicks on an object, the SceneHandler checks the type of object (e.g., location, item, or dialogue) and responds accordingly:
When transitioning between scenes, the SceneHandler triggers a visual transition and loads the new scene using the technical name of the location. The scene is loaded after a short delay to allow for transition animations to complete.
Each branching dialogue option is displayed as a button in a vertical list. The SceneHandler updates the available branches each time the dialogue advances, clearing old buttons and creating new ones. A custom script, BranchChoice, is responsible for managing each dialogue option.
When a player selects a branch, it triggers the ArticyFlowPlayer to advance the story, updating the dialogue or progressing the scene.
The inventory system allows players to collect items, combine them, and use them in the game world. Each item is linked to a global variable that tracks whether the player possesses the item.
Each item in articy:draft has a reference to a Valid Combination object. If the player tries to combine two items, the system checks if they are valid combinations. If successful, the two items are consumed, and a new item is added to the inventory. If the combination is invalid, a dialogue may be triggered to inform the player.
Scenes in Maniac Manfred often include static background images and dynamic scene elements. The template for these image objects includes a display condition script that controls whether the image is visible based on the game state.
The LocationGenerator automatically creates scenes based on articy:draft locations. Using the ULocationGenerator class, a developer can select a location, press a button, and have the scene automatically generated with all the appropriate game objects, colliders, and components.
The Maniac Manfred demo project provides a comprehensive example of how to integrate articy:draft with Unreal Engine to create a Point-and-Click Adventure game. By leveraging the ArticyImporter plugin, you can streamline the process of creating locations, dialogues, and interactive elements in your game, enabling a more efficient development workflow. While this demo project is designed to be simple, the techniques used here can be adapted to more complex projects with similar needs.