Monday, November 21, 2005

Recently

I've been building up my conversation engine that required a non-recursive permutation function ... I really didn't want to think how to make this work, luckily it's well documented on the net so I grabbed an algorithm written in C. It could work better but I think works well enough for the time being. I got another class unit tested and pretty much finished and started work on a controller class to tie all my classes together.

The only problem I have is that the Controller class requires classes from my game and I want to keep it modular and seperate from my game. I came up with the following crappy solution.

It uses a interface called ITalker implement get and sets for AreYouInAConversation? and that's about it (all that my conversation controller really needs to know). Which would be fine. . .


... but I want to be able to check things like "Are you near a lamp post?"

So this involves a messy cast that happens outside of my class. I pass the ask talker to Lua, Lua asks some other class to try and cast it to a GameObject for GameX. Then lua can use it's various loaded query functions.

Apart from that messy part of the architecture things are okay.

Today I'm playing with my scroll bar once more, it's one of the things I want complete before I move to state two. Currently it displays fine and can be resized. If you hold down the arrow the thumb zooms as fast as it can to the arrow ... far far too fast. I need a timer ... if I was thinking I'd probably have used windows timer but instead I actually have my own in it's own dll.

I don't want my GUI system to require any other dlls, so I broke it into two parts, the GUI pieces that require a clock function and those that don't. This too seems to be a messy decision :(

(The "mouse-feel" is now so much better)

I need to get break as I've managed to sort out plenty of real life stuff today.

*Scroll bar is totally finished - functionality wise any way. It needs prettying up as I use a tutorial with rather unfriendly names (caps differences in variable names *shudder*). It could also do with a few events to make it useful. I'm thinking OnMouseOverScrollButton, OnMouseOverTrack, OnMouseOverThumb, OnValueChanged. This way I can add fancy graphics and the like - a little pointy hand over the button for instance.

I'm actually a little behind where I wanted to be code wise but at least I've knocked one thing off the to-do list.
Post a Comment