Game Development Reference
In-Depth Information
Creating an RPG dialog screen
As the title implies, we'll explore a method to create a dialog screen, similar to those found
in many RPGs. It'll display an image of the character being talked to, but this could be re-
placed by using some clever camera work to zoom in on a character instead.
It will use a Nifty ListBox to display the player's available dialog options and a listener
to find out the result of the player's choice.
There most likely has to be some dialog tree system that backs the implementation. For this
example, we'll use a template class called DialogNode . This will have information about
a character's name, image, and what it says. It also contains the player's options as a string
array, as shown in the following screenshot. What's missing from it is the callbacks for
each option. It will, however, be possible to call it from the controller's listener method.
Search WWH ::




Custom Search