Jump to content

Recommended Posts

Posted

  Per usual it is late at night and I'm writing this up. So I'll try to make this quick. But we have a few enhancements that were finished today. The first was that I can now add and remove listeners when entering and exiting states. I haven't fully tested it at scale, as we don't have a scale TO test at. For now it is sufficient that I experience no errors.

  The next update was with the event system that I use. The problem was that adding events at runtime to the event listeners would result in an empty field instead of a populated one. This doesn't matter at runtime for builds but in editor it is very annoying. Here are some before an afters to help visualize the issue:

image.png?ex=6611c2f8&is=65ff4df8&hm=f99

image.png?ex=6611c31d&is=65ff4e1d&hm=139

  Now we can easily see what action the callback is! This is really helpful for making sure things were assigned properly. I've precompile flagged the change so that it won't actually be part of the runtime builds.

  I've also enhanced the Component Collection system so that we can add components to the collection lookup tables at runtime. This isn't super exciting but it DOES mean I can find these listener objects trivially on all my actors and game states. This is huge for me and I'm pretty happy about it.

  Tomorrow we'll hook up some spawners for food, so that our kitties can enjoy tasty targets raining from the sky. Then I'll add an "adventure square" this will be our stand in for the front gates of the Manor. Cats that can't satisfy their needs will walk over to this square and leave on an adventure. Those adventures will be for finding more food, or for finding some entertainment.

  In this way our cats will never end up stuck starving for fun or food Neopets style. Instead they'll take the initiative to solve it themselves. This will be slower than doing it yourself but it means you could let the game run overnight if you wanted and you wouldn't come back to furious or starving cats (but I repeat myself).

  We'll also see about adding the ability to sleep in any open square when all beds are taken or missing.

  Finally I need to remember to add in a distance check when our cat picks a target. If the asset is too close it actually won't generate a path because the target is already beside it. We'll need to perhaps have the cat just immediately transition to interaction state in those situations.

×
×
  • Create New...