Strides Scripts is not ideal for nested complex conditionsFiled Under: Jedi Wing 2
INTRODUCTION
I have to admit that Strides Script isn’t not the best orchestration engine around. Other orchestration engines like BPEL (for Web Services Orchestration) does a better job in terms of handling nested complex conditions.
Strides Scripts was originally meant to orchestrate complex procedures and not complex nested conditions.
Complex procedures usually involve timed executions and sequence integrity. While complex conditions involve having multiple nested conditions in order to achieve something.
PROBLEM
This is easily done in programming since the conditional semantics of the major languages allow such nested conditions. (Good thing if used properly, disastrous when it’s abused, thus introducing coverage metrics like MC/DC and standards like DO-178B).
Up till now, I have no major issues developing how things look like, how widgets animate and move about and how sprites fade in and out. However when it comes to intricate conditions that lead to an action, say:
If I’m at x and y and if I’m supposed to go UP
then I execute this method
else if I’m at other x and y and I’m supposed to go UP
then I execute another method
else
then I do something else.
Strides Scripts can easily handle if-else, but not if, else-if then else. Now of course, one can say, simply make it happen! Develop the feature! Let me tell you, it’s not that simple.
Doing so breaks the purpose of having Scripts. In order to solve this issue, instead of just shouting and screaming for more code implementations, one should try to think of better ways and be innovative.
WORKAROUND
To resolve that issue up there, simply order the condition to be an if-only, not if-else. Then create another script to accommodate the else-if portion into a simple if-only condition. Execute both scripts in the right order and you’ll get what you want eventually anyway.
The current conditions handling in Scripts Scripts are already complex in a way that all the conditions are resolved with a true or false. Along with the condition operator in the condition, (AND, OR, XOR and NAND), one can easily control the flow.
FUTURE
However, I also do recognize the lack of composite condition flow such as (IF a=1 AND b=2 OR c=3 AND d=4). There’re plans to actually implement such composite conditions in the future version of Strides Scripts. It might be expedited to conform with the needs of the game.
CONCLUSION
Eventually, Strides Scripts will be transformed into a full scale GUI with logical flows visible from different levels of view. This will then be integrated into the game application that allows game developers to directly develop and test the game directly without even having to restart the game or recompile any codes.
Thus separating the game development contents, assets and game contents away from coding, effectively separating the responsibilities of game engine/feature coders away from game content developers.
- Permalink
- Admin
- 8 Feb 2009 7:56 PM
- Comments (0)