Loading...

Allow me to regale you with further tales of Vox Venio’s development.

The dialog system which you’ve seen working in-game was like an unplumbed toilet — seemed okay to look at but disastrous to use. Before tonight, I had to hard-code any dialog in. Yuck.

Tonight I resigned myself to the unfun plumbing work of hooking up to the level files. So, as per my philosophy, a prospective level designer can script dialog to his heart’s content with a tool no greater than Notepad. By means of example, here are the two lines from the level’s properties file that produced that thought-provoking conversation shown in the images above:

dialog 124 null hero Red "Jeremiah" Cyan "'I am talking in blue-ish text, but my name is in red text.'"
dialog 124 null narrator Yellow "Ling" Orange "'Whereas my name is yellow and my speech is orange.'"

(Astute readers will notice that I’ve used different types of quote characters. Yeah, you got me, there’s no escape character functionality implemented. Not yet.)

Welcome to the world of serialisation. (Well, deserialisation in this case.)

I’ve written custom code to parse lines like this, and in hindsight, it’s been a pain. I underestimated how complicated the lines could get. I probably should have used some clever serialisation code. Now I don’t want to dump things to XML because while XML is human-readable, it’s not exactly fun to manually edit. But there’s always the option to write a custom formatter that implements IFormatter. Whether or not I actually bother to do something like this depends on how much more of this “plumbing” it turns out needs to be done.

What strikes me as amusing is how it’s easier and faster to implement speech recognition, or add new functionality to the rover, than it is to get Vox Venio to understand how to read a line of text. Wonders of object orientation, I suppose.

Still, soon hopefully all the plumbing work will be behind me. Then it will be safe to sit on that toilet.

blog comments powered by Disqus