The Huntress is a project of more than 40 students. Participants from all four programs work together on a single project, experiencing the teamwork, constraints and challenges of delivering a playable product.

CONSTRAINTS

15-weeks production
FPS Horror

ENGINE

Unity
Visual Studios C#

 LEVEL DESIGN BY PHILIPPE SYLVESTRE

This project taught me a lot about programming and the stages of production. As a level designer, I know how valuable a good technical knowledge is.

My role

–  Script C# systems : inventory, crafting, dialog and UI
–  Create, document and maintain tools for designers
– 
Assist the design team and help to debug

Inventory
& Crafting System

–  Integration of UI including quick slots, chest, documents and lootable

–  Cheat Tools for inventories and crafting
–  Multiple types of items with different functions depending on the inventory
–  Scriptable objects saved with JSON

INVENTORY
crafting
				
					using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/**********************
 Fait par : Daisy
 Derniere revision: 19-05-2021
***********************/
[CreateAssetMenu(fileName = "Inventory", menuName = "SO/Inventory")]
public class SO_Inventory : ScriptableObject
{
    public int slots;
    public List<InvSlot> inv;

    public SO_EventManager em;

    private int stackChest = 99;
    public static bool isFull = false;

    public int UpdateItemAdd(SO_Items item, int amount = 1, bool isChest = false)
    {
        for (int i = 0; i < amount; i++)
        {
            bool addToSlot = false;

            for (int j = 0; j < inv.Count; j++)
            {
                if (inv[j].item == item)
                {
                    if (!isChest)
                    {
                        if (inv[j].amount < inv[j].item.maxStackSize)
                        {
                            inv[j].amount++;
                            item.qtyInventory++;
                            addToSlot = true;
                            break;
                        }
                    }
                    else
                    {
                        if (inv[j].amount < stackChest)
                        {
                            inv[j].amount++;
                            item.qtyChest++;
                            addToSlot = true;
                            break;
                        }
                    }
                }
            }
            if (!addToSlot)
            {
                if (inv.Count + 1 > slots)
                {
                    em.notifHUD.Invoke(1, true);
                    return amount - i;
                }
                else
                {
                    inv.Add(new InvSlot() { item = item, amount = 1 });

                    if (!isChest)
                    {
                        item.qtyInventory++;
                    }
                    else
                    {
                        item.qtyChest++;
                    }
                }
            }
        }
        em.invEvent.Invoke(this);
        return 0;
    }

    public void UpdateItemRemove(SO_Items item, int qtyRemove)
    {
        for (int i = inv.Count - 1; i >= 0; i--)
        {
            if (inv[i].item == item)
            {
                if(inv[i].amount <= qtyRemove)
                {
                    qtyRemove -= inv[i].amount;
                    inv.Remove(inv[i]);
                }
                else
                {
                    inv[i].amount -= qtyRemove;
                    break;
                }
            }
        }
        em.invEvent.Invoke(this);
    }

    public void Swap(int indexA, int indexB)
    {
        InvSlot tmp = inv[indexA];
        inv[indexA] = inv[indexB];
        inv[indexB] = tmp;
        em.invEvent.Invoke(this);
    }

    public int EmptySlotCount
    {
        get
        {
            int counter = slots;
            counter -= inv.Count;
            //Debug.Log($"Il reste {counter} espace d'inventaire");
            return counter;
        }
    }

    public InvSlot FindItem(SO_Items item)
    {
        for (int i = 0; i < inv.Count; i++)
        {
            if (inv[i].item == item)
            {
                return inv[i];
            }
        }
        return null;
    }

    public InvSlot GetEmptySlot()
    {
        for (int i = 0; i < inv.Count; i++)
        {
            if (inv[i].item == null)
            {
                return inv[i];
            }
        }
        return null;
    }

    public void ResetInv()
    {
        for (int i = 0; i < inv.Count; i++)
        {
            inv[i].item.ResetAll();
        }
        inv.Clear();
    }


}

[System.Serializable]
public class InvSlot
{
    public int amount;
    public SO_Items item;
}
				
			

Dialogue System
& NPC

–  System of JSON Files – Convert all dialogues to ID efficiently 
–  Easy-to-use system for narration & level designer
–  Tool of triggers with ID
–  Integration of dialogues, notifications, objectives, tutorials

TUTORIAL + PICK UP
DIALOG
				
					using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
/**********************
 Fait par : Daisy
 Derniere revision: 17/06/2021
***********************/
public class Man_Dialogue : Singleton<Man_Dialogue>
{
    private Dictionary<string, string> dicoDialogue = new Dictionary<string, string>();
    void Start()
    {
        var dialogTxt = Resources.Load<TextAsset>("dialogueFR");
        Dialogue[] dataDialogue = JsonHelper.FromJson<Dialogue>(dialogTxt.ToString());
        for (int i = 0; i < dataDialogue.Length; i++)
        {
            dicoDialogue.Add(dataDialogue[i].id, dataDialogue[i].text);
        }
    }

    public string GetDialogue(string key)
    {
        if(key == "") return ($"Aucune key id assigne");
        if (dicoDialogue.ContainsKey(key)) {
            return dicoDialogue[key];
        }
        else
        {
            return ($"L'id {key} n'existe pas");
        }
    }
}

[System.Serializable]
public class Dialogue
{
    public string id;
    public string text;
}
				
			
IN INSPECTOR

.. and more

–  NPC with chest inventory, save and crafting
–  Design and create doors
–  Key system to unlock doors and elevator 

DOOR SYSTEM
ELEVATOR
NPC