Friday, July 10, 2015

Crazy Tags and Behaviours

Welcome to another update for The Foundation.

This week its about tags.

I've mentioned tags many times over the course of my videos but there is a question I seem to receive almost every video.

"How do you plan to implement over 2000 SCP articles?"

I thought I would take some time while I'm deep into AI to answer that.

I'm not.

Wait Riscvul you said every article would make it into the game? Are you changing your stance?

No, but I recognized when planning this project out, that implementing over 2000 different anomalies would be impossible. At the very least it would take too much time. So I aimed to find a different way of tackling the problem, tags.

Each article on the wiki is tagged for ease of searching. You can find these tags at the bottom of the page. Lets take the infamous 682 for example.

We can see this article has the following tags: adaptive, heritage, keter, reptilian, scp, self-repairing, sentient. So what does that do for the game? First the 'keter' tag can be useful for determining the general power level of the object. A safe object is not going to pose as much risk as a keter level object in general. The next benefit comes when the AI and behaviour of this object are concerned. Each tag will have a list of actions that it will grant that entity in combat or containment. The AI can choose between these various actions to decide how it will act. The actions will be weighted so the AI will known which attack is stronger for example, or which movement method is more useful.

For example, 682 has the self-repairing tag. This would grant him a healing/repairing action that when scaled with his keter rating will be quite powerful. His reptilian tag would likely grant him a bite attack, and his sentient tag might give him an action to curse the player when no other actions are possible.

Finally tags will give the ability to greatly simplify the number of models, textures, and animations that will be required by placing tags in groups. Currently I am thinking about having the following main groups. (This is definitely subject to change and debate)

  • Animal
  • Automaton
  • Amorphous
  • Contagion
  • Humanoid
  • Location
  • Plant
  • Tool
Each of these groups will have a main action set, a visual representation, and animation set that goes with them. 682 would fall under the animal group for example.

But wait, animal is too generic there are tons of different looking animals!

So true, so certain child tags of a group will override the base appearance with their own. The animal tag group will have an override for avian, reptillian, canine, feline, etc. However the general goal of simplifying the amount of content generation will be met.

This will allow for every article even new ones to get represented in the game, without the need for time intensive content generation. However, as you probably have already determined, it will not accurately replicate the nuances of each article, in fact sometimes the behaviour might be way off from the original article.

However there will be a solution to this as well. I'm not ready to talk about the specific details yet, but I am building in a modding solution for the creation of specific implementations of SCP objects. When the game creates an anomaly during a session it will first check to see if a mod exists. If it does it will use the mod created visuals and behaviour instead of the generic tag-based behaviour.

The mod structure and method of development is still under construction, but its looking pretty good so far.

This should give a good overview of the tag system and my plans for it. I would love feedback on this as there are likely gaps in my logic. I look forward to hearing from you!