Saturday, September 22, 2012

Day 130: Actions

Well today was pretty good, got the action sequence part working and it's ok. Still a lot of issues need more work, but hey at least it works.

The code for moving the avatar to a specific spot, orienting correctly, playing an animation for a specified time and then moving back to it's original position, all while allowing for it to be skipped at any time. This is all in one script, and I think it's a right mess. I used so many boolean state flags to keep track of it all that I'm definitely sure that there is a more simple and elegant way to handle all this.

I have a vague idea for a sequencer structure, that basically takes in function delegates which would be single parts of the big script, executing them, waiting for next and going on until all queued operations are finished. Pretty much a hack job at a cutscene controller or game scripting from SDKs.

Still have to tie all the various components that could make up an action together; animation, menu, and camera stuff all need to be properly sequenced and setup for each action - which I haven't gotten around to yet.

I'm sure there is always a better way to do things, but I won't find out until after stumbling in the dark figuring out my own poor implementation to get an understanding of what ever it is that I'm doing.

No comments:

Post a Comment