Jump to content

A Distant Feeling of Statefullness


Recommended Posts

I'm reminded today of a Stephen King book and film called "The Langoliers" as I stare off into the distance and wonder what is approaching. It could be a great many things. A friend, a foe, something beyond mortal comprehension.


I stand and wonder. Squinting a bit as the objects grow bigger. They are moving quite fast...which does leave me wondering. Have...have I fed the cats today?


Oh god...

 Run while you can!


Also, I suppose I should mention. Individual state machines for actors is up and running. In this example we have five Moosecats that have initialized and then switched to "wander". Since I haven't setup the logic more than that their "wander" target is always the player. That won't always be the case. Additionally we'll need to turn off collisions because otherwise they will hunt you to the ends of the play space and then kick you off into the infinite abyss sparta style.

Which is amusing, but I don't think that's a healthy play pattern.

This particular update to the state machines was a little challenging. The system I use is excellent for a single layer per "state machine" but in the case of actors like the cats, you have N layers. And once N > 1 we had a cross talk problem where the last cat would take over as the sole owner of the state machine.

Now each instantiated actor will generate their own state units and transition, read, and adjust their own states without any worries of it hitting others. Tomorrow I'll do a bit more state work on the cats so that we can give them a few locations to travel to, and perhaps see about having them eat something. Adding in some kind of "thinking" time before they do things, a value, like hunger and other traits, that will be variable per cat.


Link to comment
Share on other sites

Also, to respond to myself with one last thought. You may have noticed a couple of the cats stopped hunting me down. This was half correct. They should have stopped once they were close enough but not stopped forever. It looks like the distance calculations are off in some way.

Link to comment
Share on other sites

  • Create New...