Warscale 26 - OptionsDlg
by Guimo · 11/02/2008 (4:52 pm) · 3 comments
Hi everybody!
The weather change in Australia is driving me crazy. One day is 34C and the next day is 15C. I'm sweating and then the night gets cold and if I cover myself I start sweating again. I passed this weekend almost in semi catatonic state... awful... I'm not used to this. In Peru weather is way more stable.
Anyway, one member of this community invited me to join a team to develop a demo for the Green Ear contest and I was extremely tempted to do so. I even opened my time box (where I save my game ideas) and found one suitable for the contest. Simple gameplay, simple design, fast to develop. The problem is that the next week (from 10 to 25) my boss is leaving for two weeks. I work in a company which develops a Stock Market Surveillance System and you may understand things are a little shaky right now. That leaves me with a ton of work to do those days. So I guess I will definitely pass this contest as the time frame is way too short. Its possible that I wont even have time to work on Warscale... bummer...
Ok, back to Warscale.
What was planned
This week I focused on some enhancements for the Options GUI. The idea was to give the GUI a rework in order to allow it to use the Warscale design.
The first thing to do was to remove the tabbed pane. Its not exactly what you need for this kind of game as some additional buttons are required. Instead, a menu was created with the options. When you click a button the appropiate pane opens. Similar but not the same. You may see the result in the screenshots.
One of the hard things to solve is that the original menues rely a lot on the dropdown control and if you remember I use a custom dropdown which works using Torquescript. This custom solution works fine and provides a lot of functions but is not as easy to use as a standar dropdown either. Anyway I managed to move all the code to use this new control.
Other thing was the resolution change. I filtered out all the low resolutions (I want at least 1024x768) leaving the full screen and high resolutions. There was a problem with the custom dropdown solution when changing the modes but it was solved after some hours of work (it should have been solved in minutes except for a bug I didnt noticed).
The final thing was to change the slider control. As other controls it stretches the central portion which is something I really dont like because you may lose your artwork definition. Also, the slider was out of place. I created a new control which fixed both problems.
So, the Video and Audio menus are working. If anyone may explain me the difference between volumeSim, Volume Master and VolumeShell it would be great. I'm not really experienced at sound engineering.
The controls pane is not working for now. This is intentional because I still dont know what to do with that pane. This is not an FPS so I really dont need to change keys. Maybe I will use it to set the mouse speed, the map scroll speed and the camara movement speed. Dont know yet. Thats why its still empty.
Finally, some actionsmaps were added here and there in order to improve the experience with the keyboard.
What wasnt planned
Aside from the new slider control which was fairly easy, I added a Resign game option which is just a soft way to leave the game. I have another way to leave the game which is called Abandon meaning the player abandoned the battle and the left the game room completely leaving the other players alone and dont care about the results. Abandoning is a quite rude way to leave, in the real life it would be like standing up and storming out of the house where you were invited to play. Resign is the way to tell the opponent he has won but a rematch is expected.
Screenshots!
This week I will show you the result of my work on the options menu. The first image is the main options dialog.

This is the Video Options.

And finally the sound options.

The plan for this week
This week I need to work a lot in Warscale because I'm not sure the next week I will be able to do so. This week Im back to the 3D area. This time I will focus on the map generator. This is basically a standar map editor with some additional tricks allowing me to add special elements and markers.
Snippet
I have used this script function a lot in my development. Maybe you find some use for it.
This simple function allows to search for a word or words in a string and return true if there are any matches. I.E.
%a = "1 3 5 7 9";
%b = "3";
%c = "2 4";
%d = "6 7";
%found = findInString(%a, %b); //returns true because 3 is in the original string
%found = findInString(%a, %c); //returns false because neither 2 nor 4 are in the original string
%found = findInString(%a, %d); //returns true because 7 is in the original string
This has been useful for me in order to match creature types against spell targets. Sometimes a spell was only supposed to affect a creature or Artifact. So it helped me to test the unit description to see if something matched.
Luck with your projects!
Guimo
The weather change in Australia is driving me crazy. One day is 34C and the next day is 15C. I'm sweating and then the night gets cold and if I cover myself I start sweating again. I passed this weekend almost in semi catatonic state... awful... I'm not used to this. In Peru weather is way more stable.
Anyway, one member of this community invited me to join a team to develop a demo for the Green Ear contest and I was extremely tempted to do so. I even opened my time box (where I save my game ideas) and found one suitable for the contest. Simple gameplay, simple design, fast to develop. The problem is that the next week (from 10 to 25) my boss is leaving for two weeks. I work in a company which develops a Stock Market Surveillance System and you may understand things are a little shaky right now. That leaves me with a ton of work to do those days. So I guess I will definitely pass this contest as the time frame is way too short. Its possible that I wont even have time to work on Warscale... bummer...
Ok, back to Warscale.
What was planned
This week I focused on some enhancements for the Options GUI. The idea was to give the GUI a rework in order to allow it to use the Warscale design.
The first thing to do was to remove the tabbed pane. Its not exactly what you need for this kind of game as some additional buttons are required. Instead, a menu was created with the options. When you click a button the appropiate pane opens. Similar but not the same. You may see the result in the screenshots.
One of the hard things to solve is that the original menues rely a lot on the dropdown control and if you remember I use a custom dropdown which works using Torquescript. This custom solution works fine and provides a lot of functions but is not as easy to use as a standar dropdown either. Anyway I managed to move all the code to use this new control.
Other thing was the resolution change. I filtered out all the low resolutions (I want at least 1024x768) leaving the full screen and high resolutions. There was a problem with the custom dropdown solution when changing the modes but it was solved after some hours of work (it should have been solved in minutes except for a bug I didnt noticed).
The final thing was to change the slider control. As other controls it stretches the central portion which is something I really dont like because you may lose your artwork definition. Also, the slider was out of place. I created a new control which fixed both problems.
So, the Video and Audio menus are working. If anyone may explain me the difference between volumeSim, Volume Master and VolumeShell it would be great. I'm not really experienced at sound engineering.
The controls pane is not working for now. This is intentional because I still dont know what to do with that pane. This is not an FPS so I really dont need to change keys. Maybe I will use it to set the mouse speed, the map scroll speed and the camara movement speed. Dont know yet. Thats why its still empty.
Finally, some actionsmaps were added here and there in order to improve the experience with the keyboard.
What wasnt planned
Aside from the new slider control which was fairly easy, I added a Resign game option which is just a soft way to leave the game. I have another way to leave the game which is called Abandon meaning the player abandoned the battle and the left the game room completely leaving the other players alone and dont care about the results. Abandoning is a quite rude way to leave, in the real life it would be like standing up and storming out of the house where you were invited to play. Resign is the way to tell the opponent he has won but a rematch is expected.
Screenshots!
This week I will show you the result of my work on the options menu. The first image is the main options dialog.
This is the Video Options.
And finally the sound options.
The plan for this week
This week I need to work a lot in Warscale because I'm not sure the next week I will be able to do so. This week Im back to the 3D area. This time I will focus on the map generator. This is basically a standar map editor with some additional tricks allowing me to add special elements and markers.
Snippet
I have used this script function a lot in my development. Maybe you find some use for it.
//returns true if at least one of the words have been found in the string
function findInString(%string, %words) {
%words = trim(%words);
while(getWordCount(%words) > 0) {
%word = firstWord(%words);
%test = trim(%string);
while(getWordCount(%test) > 0) {
if(!stricmp(firstWord(%test), %word))
return true;
%test = restWords(%test);
}
%words = restWords(%words);
}
return false;
}This simple function allows to search for a word or words in a string and return true if there are any matches. I.E.
%a = "1 3 5 7 9";
%b = "3";
%c = "2 4";
%d = "6 7";
%found = findInString(%a, %b); //returns true because 3 is in the original string
%found = findInString(%a, %c); //returns false because neither 2 nor 4 are in the original string
%found = findInString(%a, %d); //returns true because 7 is in the original string
This has been useful for me in order to match creature types against spell targets. Sometimes a spell was only supposed to affect a creature or Artifact. So it helped me to test the unit description to see if something matched.
Luck with your projects!
Guimo
#2
Of course I would like to create a lot of resources with all the controls but my time is limited. When the game is finished I may take some time and post my code changes.
Luck!
Guimo
11/02/2008 (6:09 pm)
Hi Mike!Of course I would like to create a lot of resources with all the controls but my time is limited. When the game is finished I may take some time and post my code changes.
Luck!
Guimo
#3
btw, for the findInString, there is a consoleFunction: isWordInSet which do similar
11/04/2008 (3:49 am)
Nice blog!btw, for the findInString, there is a consoleFunction: isWordInSet which do similar

Associate Michael Hall
Distracted...
The different "types" of volumes are the various channels that you can define for game sounds. Assigning the different channels allows you control of the sound levels for different "types" of sounds. masterVolume of course is the overall volume level - the max for everything, simVolume would be the ingame 3d sounds, and shellVolume would be the gui sounds. You could even do one for music, one for sound fx, or even a dedicated channel for voiceover dialogs. I think you can have up to 8, maybe more.
I enjoy seeing your progress, and I'm sure many others do also, keep up the good work.