Tuesday, January 3, 2017

Game Dev Log #2 - Getting Organized!

Finding direction when first taking on a project can be harder than it seems. You have this huge wall of things you need to work on. Finding the first thing to work on can be hard.

In order to prevent myself from becoming lost and losing focus I decided it would be best to spend some time really thinking out how to proceed. I spent much of the time since the last post trying to plan out the structure in a sensible way. I worked on testing some code inheritance and Interfaces and could really get the result I wanted. I've ended up sticking with a simple Enum + Case switch to manage states. I just have an IEnumerator setup to loop throught it ever Xf seconds.

Here's a link to the Mindmap, Includes everything I'd like to see in the prototype before moving forward. This is prolly the coolest thing yet.
Project #1

First pass on thinking of my Script References and Inheritance.






























Working on coming up with the AI behavior; here's a screen cap of my state machine:

Thanks for reading, if anyone has any suggestions please let me know.

3 comments:

  1. Seems interesting,, I have a few questions:

    What does "alarming" Means in this contest?

    You seem to have a state for attacking but not have one for being attacked."

    Why did you limit talking´s conections to investigating and cowering?

    ReplyDelete


  2. Alarming would be requesting assistance from others in it's community. So for example not all NPCs will start with Attacking, some depending on the Race, Community Type, and the specific NPCs stats vs Player statistics (from the NPC perspective) would trigger that NPC to Attack on sight or instead request assistance before Attacking.

    The talking state was for NPC stated conversations. So Investigating may lead to the NPC simply inquiring as what the Player is doing or where he's headed. While another possible condition to enter the Talking state would be the NPC giving up in a fight and attempting to plead for its life. Maybe trade something in return like info on its fellows for example.

    About the limits on transitions, this is the first pass over the states that I made. I was looking to get a feel for how complex it would be to code. This has grown to decent Text file that includes state, state purpose, actions that would be performed during the action, Conditions to enter and exit the state.

    ReplyDelete
  3. Alarming makes sense, I wouyl say that fleeing should have a connection to it but since you say the file already evolved no point to it.

    Will you show this file in a future post?

    Have you considered using multiple FSMs per AI? It is something I am trying and heven´t found many refrences on the web.

    For example, the agent may decide to flee, but he can flee silently/calling for help, or warning others.

    I am trying to have the FSM that controls fleeing separated fromt he one that control social interactions, Somewhat similar to how mecanim has various "layers" in other to not need multiple states of "fleeing". Early experiments are encouraging.

    ReplyDelete