Skip to content
View in the app

A better way to browse. Learn more.

moosecatSoft

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

A Distant Feeling of Statefullness

Featured Replies

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.

image.png?ex=65ffa137&is=65ed2c37&hm=270

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?

image.png?ex=65ffa144&is=65ed2c44&hm=d52

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.

 

  • Author

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.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.