Progressing towards progress...
by Ted Southard · 11/13/2008 (9:37 am) · 5 comments
When I last blogged, I posted some screenies of the chat system and how it promised to raise the bar on RPG's a bit. What I showed was the following:

While I was trying to show as much as possible, I've been giving a lot of spotlight towards the conversation system, and I'll take a minute or two to do so again:

This is a much clearer shot, and shows the next iteration of the system. Basically, I've switched some gears and moved from using client-side dialog statements to interact with the NPC's towards using "dialog operators". This method stemmed from a design meeting with Chris and Rick, my fellow designers, and ideas that they had for what could be done with this system, and the problems those ideas caused with my then-current design. What was needed was a simplification of the gameplay design of this feature so that people could navigate it almost as easily as, say, the dialog menus for Mass Effect. The fact is, though, that Mass Effect is a limited dialog tree, where what we're representing with our system is a knowledge base that NPC's can reflect back to the player in a way that imitates conversation. Hence, our system has a lot more buttons.
And while I'm not prepared to go into what all the buttons mean and do right now (not until I have a video), I can say that the system has lost absolutely nothing for functionality since the last update, and has gained several features, mostly in regards to its internal handling of information. The new version also allows conversation to involve the immediate environment as well, otherwise what's the point of talking if you can't click on something and say "what the hell is that thing?". As always, it's not a complete feature yet, and there are some interesting features that I have yet to show in action (and which will require some video to show off), but that's coming down the pike sooner than even I expected.
In other news, I've gained a huge amount of free time from being laid off a few weeks ago. It kind of sucks, mainly because I actually did not hate my job, but also because it happened about 3 days before my vacation to the Galapagos and Machu Picchu (and yes, I have texture photos from both, though not nearly as many as I would have liked). Ah well- there's not much I can do about it, the economy being what it is, I'm was just one of the early victims of the recession, and that's all I got to say about that. Besides, it could be a blessing in disguise in allowing me a lot more time to work on this project.
Moving on, the thing I've been discussing with the design team lately is that of crafting. Specifically, we've been mulling over ways to make it deeper while still keeping it fun (or, rather, making it fun where it may not have always been before). We're in agreement on all the basics of the system, and are finalizing some facets of it that I'm going to be testing out as soon as I'm done with this blog: Material Properties.
Basically, we're looking to infuse a little bit of the real world into the crafting of Epic Frontiers by introducing material properties into things. The details are still slightly fuzzy because we're working out the kinks, but in a nutshell, it should allow the player to experiment with combining materials to get certain kinds of alloys that are beneficial in more than just being stronger. They can be lighter, or inherit some properties such as cold/heat/magic resistance, or other properties we haven't looked into yet. It sounds more complicated than it actually is, and in "paper examples" so far it seems to be bearing out in pretty neat ways, so stay tuned!

While I was trying to show as much as possible, I've been giving a lot of spotlight towards the conversation system, and I'll take a minute or two to do so again:

This is a much clearer shot, and shows the next iteration of the system. Basically, I've switched some gears and moved from using client-side dialog statements to interact with the NPC's towards using "dialog operators". This method stemmed from a design meeting with Chris and Rick, my fellow designers, and ideas that they had for what could be done with this system, and the problems those ideas caused with my then-current design. What was needed was a simplification of the gameplay design of this feature so that people could navigate it almost as easily as, say, the dialog menus for Mass Effect. The fact is, though, that Mass Effect is a limited dialog tree, where what we're representing with our system is a knowledge base that NPC's can reflect back to the player in a way that imitates conversation. Hence, our system has a lot more buttons.
And while I'm not prepared to go into what all the buttons mean and do right now (not until I have a video), I can say that the system has lost absolutely nothing for functionality since the last update, and has gained several features, mostly in regards to its internal handling of information. The new version also allows conversation to involve the immediate environment as well, otherwise what's the point of talking if you can't click on something and say "what the hell is that thing?". As always, it's not a complete feature yet, and there are some interesting features that I have yet to show in action (and which will require some video to show off), but that's coming down the pike sooner than even I expected.
In other news, I've gained a huge amount of free time from being laid off a few weeks ago. It kind of sucks, mainly because I actually did not hate my job, but also because it happened about 3 days before my vacation to the Galapagos and Machu Picchu (and yes, I have texture photos from both, though not nearly as many as I would have liked). Ah well- there's not much I can do about it, the economy being what it is, I'm was just one of the early victims of the recession, and that's all I got to say about that. Besides, it could be a blessing in disguise in allowing me a lot more time to work on this project.
Moving on, the thing I've been discussing with the design team lately is that of crafting. Specifically, we've been mulling over ways to make it deeper while still keeping it fun (or, rather, making it fun where it may not have always been before). We're in agreement on all the basics of the system, and are finalizing some facets of it that I'm going to be testing out as soon as I'm done with this blog: Material Properties.
Basically, we're looking to infuse a little bit of the real world into the crafting of Epic Frontiers by introducing material properties into things. The details are still slightly fuzzy because we're working out the kinks, but in a nutshell, it should allow the player to experiment with combining materials to get certain kinds of alloys that are beneficial in more than just being stronger. They can be lighter, or inherit some properties such as cold/heat/magic resistance, or other properties we haven't looked into yet. It sounds more complicated than it actually is, and in "paper examples" so far it seems to be bearing out in pretty neat ways, so stay tuned!
About the author
Started with indie games over a decade ago, and now creates tools and tech for games. Currently working as a contractor for startups and game studios.
#2
Fantastic work on dialog system... looks a little complicated, but depending on your target audience it looks flexible enough to handle some real role playing as opposed to a hack and slash type game.
11/13/2008 (10:42 am)
I feel your pain. I've had something like that happen to me as well. A few months ago I got laid off while I was on vacation and I didn't even get my vacation pay. :-(Fantastic work on dialog system... looks a little complicated, but depending on your target audience it looks flexible enough to handle some real role playing as opposed to a hack and slash type game.
#3
BTW... I'm using a MLControl for my chat system instead of a guiVector Control to render the GUI. This allows me to use any font type, size and color, use tags and even use emoticons (in a future implementaion), links, mouse over events and other tricks. If you want details on how to do this just drop me a line.
I hope you liked your trip to Maccu Picchu (did you walked the Inca Trail and visited Saccsayhuaman too?). Its a wonderful destination. Food in Lima is awesome... I really miss my country :)
Luck in this new times and finding a new job!
Guimo
11/13/2008 (3:51 pm)
Sucks to be laid off like that... but things happen for a reason and maybe JoZ's idea is a good option. BTW... I'm using a MLControl for my chat system instead of a guiVector Control to render the GUI. This allows me to use any font type, size and color, use tags and even use emoticons (in a future implementaion), links, mouse over events and other tricks. If you want details on how to do this just drop me a line.
I hope you liked your trip to Maccu Picchu (did you walked the Inca Trail and visited Saccsayhuaman too?). Its a wonderful destination. Food in Lima is awesome... I really miss my country :)
Luck in this new times and finding a new job!
Guimo
#4
I'm interesting about the chat system using the MLControl and have sent you a email. Thanks.
11/13/2008 (6:31 pm)
@Guimo:I'm interesting about the chat system using the MLControl and have sent you a email. Thanks.
#5
a. Change your GUI to use a guiMLTextControl instead of a guiMessageVectorControl. the guiMLTextcontrol should be inside a scroll control, same as the guiMessageVectorControl so you will have a hierarchy like:
In this example the ML control is called BattleChat and the scroll is called scrBattleChat.
b. Create your MessageVector object as usual. This is usually done during the initialization. Search for MessageVector in your code.
e.g. $BattleChatVector = new MessageVector(mvBattleChat);
c. Add this function to the C++ code of your guiScrollCtrl.cc (like in the end of the file) and recompile. This will expose a function which tells if the scroll is in the last line. The function is already implemented, you just need to expose it.
d. Put this script function somewhere... i.e. in /yourproject/client/init.cs
This function will refresh the MLControl from the lines in the MessageVector and reposition the scroll to an appropiate position.
e. Create a function to add messages to the MessageVector:
Thats all... you should be set and ready to go. You may add a new line to the chat by doing:
BattleChat.addLine("[Player1] Hi");
BattleChat.addLine("[Player2] How are you");
BattleChat.addLine("[Player1] Fine");
You can support any tag available in the ML definition including images and links.
Please try this and tell me if everything worked fine. If it does then tell me so I can write a resource.
Luck!
Guimo
11/13/2008 (8:16 pm)
Some people are asking for the same so here it goes:a. Change your GUI to use a guiMLTextControl instead of a guiMessageVectorControl. the guiMLTextcontrol should be inside a scroll control, same as the guiMessageVectorControl so you will have a hierarchy like:
new GuiScrollCtrl(scrBattleChat) {
canSaveDynamicFields = "0";
Profile = "ScrollProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "5 5";
Extent = "524 100";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
willFirstRespond = "0";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
constantThumbHeight = "1";
childMargin = "4 4";
new GuiMLTextCtrl(BattleChat) {
canSaveDynamicFields = "0";
Profile = "GuiWSMLTextProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "4 4";
Extent = "514 100";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "";
};
};In this example the ML control is called BattleChat and the scroll is called scrBattleChat.
b. Create your MessageVector object as usual. This is usually done during the initialization. Search for MessageVector in your code.
e.g. $BattleChatVector = new MessageVector(mvBattleChat);
c. Add this function to the C++ code of your guiScrollCtrl.cc (like in the end of the file) and recompile. This will expose a function which tells if the scroll is in the last line. The function is already implemented, you just need to expose it.
ConsoleMethod(GuiWSScrollCtrl, isScrolledToBottom, bool, 2, 2, "() - Returns if the scroll is in the last possible position.")
{
return object->isScrolledToBottom();
}d. Put this script function somewhere... i.e. in /yourproject/client/init.cs
function RefreshChat(%messageVector, %mlControl, %scroll) {
//Is the scroll in the last line?
%inBottom = %scroll.isScrolledToBottom();
//Rebuild the text from the messagevector. The text in the messagevector already have the appropiate ML tags
%text = "";
%textlength = 0;
%numLines = %messageVector.getNumLines();
for(%i = 0; %i<%numLines; %i++) {
%line = %messageVector.getLineText(%i);
if(%textlength > 0)
%text = %text @ "\n";
else
%textlength = strlen(%line);
%text = %text @ %line;
}
//Set the text in the ML control
%mlControl.setText(%text);
if(%mlControl.isAwake())
%mlControl.forceReflow(); //Reflow the text. THis will adjust the MLControl height
//If the scroll was in the last position, reposition it in the last position
if(%inBottom)
%scroll.scrollToBottom();
}This function will refresh the MLControl from the lines in the MessageVector and reposition the scroll to an appropiate position.
e. Create a function to add messages to the MessageVector:
$BattleChatLogSize = 50;
function BattleChat::addLine(%this, %text)
{
//add the message...
while( mvBattleChat.getNumLines() && (mvBattleChat.getNumLines() >= $BattleChatLogSize))
{
%tag = mvBattleChat.getLineTag(0);
if(%tag != 0)
%tag.delete();
mvBattleChat.popFrontLine();
}
mvBattleChat.pushBackLine(%text, 0);
//Refresh after adding a line
RefreshChat(mvBattleChat, BattleChat, scrBattleChat);
}Thats all... you should be set and ready to go. You may add a new line to the chat by doing:
BattleChat.addLine("
BattleChat.addLine("
BattleChat.addLine("
You can support any tag available in the ML definition including images and links.
Please try this and tell me if everything worked fine. If it does then tell me so I can write a resource.
Luck!
Guimo

Torque Owner Giorgio Zanetti ( JoZ )
Corona Team
Anyway you'll have more time for your project and if you will come out with a nice system you could sell it to the community as an addon:-)
Best wishes :-)