Jump to content
  • Advertisement
Sign in to follow this  

Cinematic and Dialog System, how?

This topic is 2952 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'v been interesting how an "Cinematic"( Or Cut-scene system ) works as well as how "NPC" dialog systems work that can handle logic.
For the Cinematic part I have no idea, since you will need run movement, effects and such parallel as well as making them wait for the old event action to complete ( for e.g Movement of an NPC ).
For dialog I have actually one idea!

Remember that old RPG-Maker ( XP, VX, 2003 ect )? That had an Linear layout of It's logic? You added different events inside an list.

Move(MoveDirection.Up, 5);
Move(MoveDirection.Left, 3);
Say("Finished Moving");

Well the structure is linear so what better to use than an "List<Dialog>" that I can fill with dialog objects.
On triggering the game runs through "all" dialog from the beginning to the end and validates them, so lets say an Dialog object has the IfQuestCompleted(database.getQuestById(2));
That will only trigger or activate if the Quest ( with id 2 ) has been completed. I guess I'd make an abstract DialogCondition class and then make different condition classes based of it.
Like: IfQuestCompleted(), IfPlayerOwnsItem(), IfNPCStatus(), IfPlayerDirection(), IfQuestStatus() ect ect.
The Dialog object can hold one ( or several ) conditions and when they are all validated to true the dialog triggers and the right events and text is printed to the game screen?
Something like that?

Share this post

Link to post
Share on other sites
Take a look at state machines (game state machine). The game can be in any state at a time, showing an into, in a menu, in the main game world, browsing your inventory etc etc. Each one of those is a state. A state will probably have update/render/handle input functions as well as a few other things.

If you press escape then you might create a "pause menu" state and push it onto the state machine, now that renders/updates and takes input instead. When you exit it you will pop it off (a stack is useful here).

Although most of the time only one state will be getting used, you can also still update/render states below if you want. So the game could continue to run while going through dialogs or anything.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!