Jono Shields

Stoic Thought

About a year go now I discovered Stoicism.

After spending some time on the r/stoicism subreddit I found myself intrigued.

Stoicism as described by the first google result is…

an ancient Greek school of philosophy founded at Athens by Zeno of Citium. The school taught that virtue, the highest good, is based on knowledge; the wise live in harmony with the divine Reason (also identified with Fate and Providence) that governs nature, and are indifferent to the vicissitudes of fortune and to pleasure and pain.

The part that intrigued me was that last bit… indifferent to change in fortune, pleasure or pain. I had recently been through a rough patch and was not at all content with how I was feeling.

A great deal of people think that the idea of stoicism is to be tough, to not have feelings and to essentially be emotionless. But really stoicism teaches you to better understand your feelings by applying logical reasoning to your emotions. You know that feeling you get when someone does a dodgy overtaking maneuver and cuts you off. I am not saying that person isn’t an f***wit, because they definitely are. But that isn’t what’s important, here you are all riled up and would quite happily rear end him if you could afford to pay for it. You let this asshole get to you, you let him do this to you, you let him change your state of being. Why let this ignorant butthead do this to you?

When you take the time to think about how you feel and why you feel that way, your mind does not get stuck on these feelings. In fact it gives your mind something else to focus on and allows you to reflect on why you felt a certain way.

If a person gave your body to any stranger he met on his way, you would certainly be angry. And do you feel no shame in handing over your own mind to be confused and mystified by anyone who happens to verbally attack you?

It may not seem like it, but we have a lot of control over our emotions and more importantly our reactions.

When I first started learning about stoicism, each day I would read a passage from the Enchiridion of Epictetus and rewrite it in my own words. This truely helped me grasp the concepts a lot better, especially because all of the free translations are quite old (I don’t know about you but I much prefer modern english). I also found it important to absorb the context of the stoic content as well, Epictetus started as a slave in early AD. Not everything that applied to Epictetus in early Greek times applies to you in your modern life.

If you kiss your child, or your wife, say that you only kiss things which are human, and thus you will not be disturbed if either of them dies.

Back then you wouldn’t won’t to show any signs of weakness, making yourself vulnerable was a terrible mistake and I imagine crying in public was not something that was seen as acceptable (zero proof to back up these assumptions).

In fact you can see how a lot of the same principles have been modernized and are not only still used today, but have been built upon. This is seen in types of cognitive therapy such as REBT (rational emotive behaviour therapy).

REBT employs the ABC framework which provides a handy visualisation of the whole thing. An A, Activating event is the trigger and depending on your B, beliefs (be them rational or irrational evaluations) will lead to C, consequences based on those beliefs. This shows that the possible outcomes are independent of the activating event and are instead predominantly based on how the event is interpreted.

image

I didn’t mean to go on this much of a rant. But Stoicism helped me through a difficult part of my life and this morning I had the idea to put it into a video game. Maybe some of the principles that I got from stoicism can help others too.

So yeah, everything down from here are my own notes for game dev.

  • Choice based dialog and decision mechanics that allow for both stoic and non-stoic allowing the user the opportunity to see the outcomes of each. (Not sure if relying on outcome bias is the best way to teach)
  • Slowing down and visualising the process of reacting to new information. Letting a player explore the information and rationalise it before they accept it and make an emotional response.

Ah… another productive Tuesday


Using the out of box AI Character Controller

I have been thinking about making a game lately that features an AI robot character. But this morning I had the idea to reverse the roles.

Long story short here is my experience using the AI Controller in Unity. Have a quick look at the finished product here.

The drone follows me uses the AICharacterControl.cs class provided in the Unity Standard Assets. And it’s pretty easy to get it set up.

Drag the AIThirdPersonController.prefab into your scene. I swapped out the Ethan model for a free drone asset that I found.

Piece of cake right? All we do is add a target for our AI to follow or move towards.

image

Not quite. I got the error 

"GetRemainingDistance" can only be called on an active agent that has been placed on a NavMesh

Don’t know what a NavMesh is? I certainly didn’t.

A NavMesh is the approximation of walkable surfaces of a level. Not so important for a player, but incredibly useful for an AI to help it from falling down holes or getting stuck. They will look something like this…

image

Luckily Unity has got a pretty easy to use tool to help you generate this based on any gameobjects you have in your scene.

In the Docs there are some instructions that got me up and running pretty quick.

For consistency set up your NavMesh Agent’s radius, height and base offset before you start on the NavMesh. Make sure you use those values in the tool when get to baking the mesh.

I had it easy in that a drone can pretty much go anywhere, you might need to be stricter depending on your character.

Your AI character should now be moving around all on its own.

I spent a good half hour tweaking the steering settings till I found something I was happy with.

image

Now it is down to you to take it as far as you need. Unity NavMeshes use A* to calculate the shortest path. It also allows you to modify the NavMesh with different types of layer masks and apply costs to each mask. This is how you would make your AI avoid the water if it would slow them down.

Pretty damn cool stuff :D


Jono is trying something new

Update : Now I am off from work 1 day a week. This is a whole extra day a week for game dev.

So from this point forward I will be doing weekly blog posts for whatever I just so happen to get done in this extra day.

Random stuff I have been working on over the last little bit…

LockedAway - Guess Addy’s password and read their diary.

Tacotown - Starter for an interactive fiction I was planning (will probably never finish)

Carlsberg - Jamming to make a PlanetDex sort of thing

Custom Keyboard - Sent off to get some plates laser cut for a keyboard I am making.

Website revamp - Revamping the site a bit, way more minimal.

Will try my very best to update more often from now on. 

#internetpromises