The dialogue system is responsible for delivering information to the player, it’s responsible to show story dialogues, hints and controls assisting messages.

The dialogue system is divided into 3 sections

  • The dialogue popup panel
  • The dialogue popup manager
  • The dialogue popup library (Contains story characters data, hints data and visual library)

First: The dialogue Popup Panel

The dialogue popup panel is the visual object prefab shows the injected data and behave differently depends on the type of the panel, we can use a single prefab for all types or have different  prefab variants for the different types of the popup panel type.

Using prefab variants we can have multiple visual representation of the dialogue popup as for the dialogue popup data that can be injected through the manager which we will cover in a bit.

 

The dialogue popup prefab visual is divided into 2 main parts:

  • Main Box
    Shows the icon of the speaker (mainly would be the ship AI “Sylvia”), The name of the speaker and the actual speech, hint or any information we want to deliver to the player

  • Side Box
    Shows a supporting visual that explains the contents in the main box, the visual could be a video or an image. the visual is being queried from the library depends on the key for the content of the main box

The panel also plays Audio SFX/VO if provided and can be dismiss-able depends on type or data supplied from the manager.

Second: The dialogue popup manager

The manager controls the dialogue panel, inject it with the required data as well as instruct it to unique behaviors based on type. The manager allows instances for the dialogue panel based on type, that means we can display multiple panels at the same type as long as they are of different type.
The manager is also responsible for getting the correct info and visuals from the library to populate the panel as needed such as icon, title, text, audio, side box visual (image or video) based on the type of the popup.

The manager also trigger events on showing and hiding panels instances as well as passes the type and state of the panel instance. this is used for follow ups or add specific behaviors or actions depends on the panel instance state.

 

Third: The dialogue popup library

The popup library is a collection of multiple mappings for story characters data, hints data as well as a media/visual library that reference images and videos that’s used by the side box in the popup panel.

The library is divided into 2 main sections/mappings:

  • The Dialogue data library
    The data library is mapping for story character data which represents a character and it’s data (name, visual keys, speech keys, audio keys), and a hints data which represents a hint (the title, the content and the visuals).
    The library allows adding entries through inspector and will be persisted to the `DialoguePopupDataLibrary.json` under streaming assets path.

we can also add info or edit the json directly and the inspector will refresh it self using the json as base.

  • The dialogue visual library
    The visual library is a collection for VisualDataEntries that is referenced via key for each dialogue key, the visual data entry contains an icon for the main box, a visual image and a video for the side box the image or video for the side box doesn’t need to be both populated only one will be shown anyway by default the image. so either can be null.
    as for the icon if null will fall back to default icon instead.

The visual library is fully from inspector only just lick the ‘+‘ sign to add new entry and assign the values. and just supply the key to the popup manager to get the correct visuals. the Json only maps the visual entry keys, but the actual entries (icon, image and video) are only edited through the inspector later we can have the library as scriptable object and exported and edited as asset bundle

To use the Dialogue popup via code use: `UIManager.AimingSceneUI.​DialoguePopupManager`

Comments

comments

Published
Views 154

Comments (2)

  • foxtrot117
    October 20, 2019 at 2:27 pm
    Sounds great and robust!! Question for education though: Which part handles when a dialogue-box will be dismissed or pop-up? Because different dialogue-boxes will require different conditions to be dismissed. Which component will handle this functionality? My naive approach to implement such system would be to create different objects for each dialogue-box. Each object will contain each own unique behavior and all such objects may inherit from a parent class or implement an interface. I can see why my approach is less effective, performance-wise, but I can not understand how your model separates the different functionality each dialogue-box may have. Do delegates hide behind all this? Thanks in advance!!
  • AbdelrahmanHajjaj
    October 21, 2019 at 11:39 am
    The manage is the one responsible for controlling and injecting/populating the popup panel with the info. the info includes icon, title, content txt, being dismissible or should auto hide (duration) finally the side/branch box which is a visual representation that explains the written content in the main box back to your question being depends on the caller that needs to show a popup the caller will provide the manager with the basic info (non library related stuff) (basically the content txt, dismissible or not and duration for auto hide) and the manager will do the rest we can have more technical discussion on slack you can also try the first mission as it has the system functional through it with the different types feel free to ask anything about it though.

Comments are closed.

War to the Core

Recent Comments

Latest Updates

  • Solo missions

    Solo missions

    Hey guys, here are the specifics of the first two solo missions, those are sketches of the first two missions. First mission: A harvester is placed near the ship, generating supply caches. The player collects energy caches and escapes a ring of mines. No supply links allowed. The sensor component is introduced by one of […]Read More »
  • We made it to the Top 100!

    We made it to the Top 100!

    We are stoked that we managed to land on IndieDB’s Indie of the Year’s Top 100 list! We are also the only MOBA that made it to the list! The support we got from the community was overwhelming, and we would like to thank each and every person that helped us get this far. Whether […]Read More »
  • Full Campaign Series, Version 3

    Full Campaign Series, Version 3

    Characters: Daniel Blaze. Protagonist, player-character. Headstrong and rebellious. Ambiguous loyalty to the Shepherd Coalition. Joseph Blaze. Father of Daniel Blaze. Commander of the Leviathan mothership until executed for treason by the Shepherd Coalition. Sylvia. AI assistant. Provides intel, advice, mission objectives. Captain Zhukov. Cyborg commander assigned to hunt down player during the first several missions. […]Read More »
  • Story: Episode 1, Version 2

    Story: Episode 1, Version 2

    The Blaze family had long been controversial. They supported the Shepherds, but continually frustrated the Orthodox elements of their faction. Joseph Blaze was especially known for his tolerance of the weakling families that used genetic engineering to alleviate the sicknesses that exposure to the Earth’s surface had inflicted on them. Such tensions between orthodoxy and […]Read More »
  • Story: Episode 1

    Story: Episode 1

    Location: The Pole Base. When Daniel Blaze passed his final test and became the primary candidate to pilot the Leviathan, the Shepherds’ newest ship, he caused a quite a stir. Not because he’s the youngest member of the Pole fleet to be nominated for admiralship, the faction had already made peace with this as a […]Read More »
Skip to toolbar