how can we implement the story section of a game?

Suppose we have several characters and we want to implement chat and message system between them.(story section of the game)
states that show which character is speaking
I implement it with defining enum and states but is there any better method for that?

might be worth looking at the “node chat systems” that are on the asset store (don’t have to buy, just to see if that approach is worth pursuing), they’re more for the branching chat systems but they’ll cover the fixed sequence too.

2 Likes

This is a pretty big area of subject to discuss.

The problem breaks down to a directed graph that gets you through each conversation. Nodes could be choices, or else have requirements (must have “smooth talker perk equipped, etc.”) and then you write code to process that appropriately.

I think the best way is to really just tackle it yourself and see how it goes. Coroutines can go a long way to helping you sequence the contents of a particular piece of dialog tree, but there is literally a bazillion ways to go about it.

1 Like

The Dialogue System for Unity has a free evaluation version if you just want to play around with it to get an idea of how these node-based systems work.

There’s also Ink and Twine, which have open source projects to use their data in Unity.

Another option is to use a cutscene editor such as SLATE or uSequencer, which may be easier for non-interactive in-game cutscenes.

1 Like