Sign in to follow this  
Krisztian

How could I implement a dialog system?

Recommended Posts

I am working on a simple adventure. Each room is a view, you can click on things in a room. If you click on a door for example, it will take you to another room. Very much like current hidden object adventure games, but it's not a hidden object game. In each room, there can be an event character or a random encounter. If you click on the person, you should be able to start a dialog. In the dialog, I would like to be able to have a resulting event. For example, the character hands you an item. I'm only in the planning stages and I have not done anything with a dialog system before. The graphics are implemented in SDL2 and the language is C++. My main question is getting a dialog system architected in some skeleton code or at least some pseudo code. At the same time, I don't have a level organization yet. So in other words, the idea to implement things is straightforward, but I have not organized my code in any way whatsoever, to encapsulate a level or a room scene. I guess I'm asking for someone who has had experience with this type of gameplay. It's again, a simple adventure and I'm in the process of organizing implementation ideas. I would like help with this in any way possible.

 

My completed parts so far:

 

Just a pixel precision mouse click routine, so I can incorporate mask objects. If the object is animated, the mask animates with the character in a separate backbuffer. This allows for mouse hits to target the second buffer and select a stamped visible z-order of single color mask ID's. That was not too difficult to implement and is helpful if I do end up with a hidden object scene. I have not optimized it and only prototyped it in a simpler language.

 

Most needed components along with my question:

 

Game Level fileformat - need implementation idea.

SDL2 user interface (not from an external library). - Working on this at this time. Simply implementing SDL2 mouse events on images for buttons and etc.

Text output (custom font) - will be working on this next.

 

 

Thank you, for any help.

 

Almost forgot: Any dev blogs or user diaries on this type of game would be awesome if you guys have links.

Share this post


Link to post
Share on other sites

Adventures have a long tradition of beeing mostly linear in gameplay and if you have not worked with an RPG dialog system yet, this is more or less harmless. A dialog is in general just a tree where each node is a sub dialog and nodes are reached by certain situations (either you have or you have not the item the NPC wants) and so same for Quest and Story/Gameplay systems. All you need to do is first create some kind of tree structure that could handle your dialogs and gameplay actions such as giving an item to the player and a tool to investigate and build those trees.

 

Your game should then travel the tree by following the path of the Dialog/Gameplay that mathes current states and do the action of the next node. This is all about what the secrets of such systems are.

 

There exists a complete software for game designers that is capable to do exactly this and even more. You could create complete games using only this software but without the software to be an own game engine. http://www.nevigo.com/en/articydraft/overview/  Have used this several times in different Adventure and non-Adventure projects and it works quiet well for those purposes. If not in a commercial project I would write and use my own system

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this