Jump to content

  • Log In with Google      Sign In   
  • Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a $50 Amazon gift card. Click here to get started!






Showcase of character dialogue displaying

Posted by Arhim, 03 August 2013 · 448 views

Hello GameDev,

just a little something I made for displaying conversations in the game (and a perfect opportunity to try out screen recording). The following "conversation" was generated from this txt file:

[CHARACTERS]

n = 3
char1 = Neil
char2 = Andy
char3 = Olaf
texture1 = data/img/portraits/Neil.png
texture2 = data/img/portraits/Andy.png
texture3 = data/img/portraits/Olaf.png


[TEXT]

text1 = <c-Neil>Andy, do you copy?
text2 = <c-Andy>Yes Neil, what's up?
text3 = <c-Neil>We got reports of enemy forces moving in from the south.
text4 = Your job is to take them out.
text5 = <c-Andy>No problem!!!
text6 = <c-Olaf>What?!<t-1000> Orange army COs,<t-1000> this is gonna be fun.


The class loads up the file (using the config manager) and start parsing through the lines. The "<>" are used for specifying different commands. The <c-somename> is used for changing characters and <t-someint> is used for making dramatic pauses. The number of commands can be later extended if needed.

Additionally, when the mouse button is held down (or any keyboard key), the parser increases the scrolling speed and starts to skip over the 't' commands.

Cheers Posted Image







Nice work! Are you planning on having any logic in the dialog?

For now I want to keep it as simple as I can, but in the future we might add it.

August 2015 »

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
30 31     

Recent Comments

PARTNERS