, ,

Dev Blog Week 11 – Assignment 2 Continued

This was the final week for the assignment and it has been extremely busy. There were still many things to be completed and implemented into the project and they were:

  • Music and SFX
  • Models and Game Assets
  • Implementing the Event System
  • Implementing Game States
  • Ordering and queueing the character actions
  • Implementing animations
  • Character actions to take time
  • AI implementation

Now seeing as there was only one week left and this week was filled with the deadlines there were some decisions that needed to be made. I wouldn’t be able to finish all of the features due to the time constraints and so I need to make decisions on what to implement and what to leave out. I had to prioritise the above list in order of importance to the game and time it would take to implement.

Music and SFX – music and SFX would be fairly easy to implement, I only needed a song for the BGM which I could get from Incomptech. For the sound effects, I only needed 4 different sounds which included, damaged, attack, heal and defend to coincide with the possible actions a character can take. Therefore I chose to implement this aspect of the assignment.

Models and Assets – creating models for the game would be time costly and probably not integral for the game to be able to run. Additionally, I have little experience in modelling therefore, it would take even longer, I quickly decided that the best option was to leave this aspect of the game out for the final sprint. This meant that I needed a replacement strategy for the characters, I decided that simple geometrical shaped in different colours would suffice.

Implement Event System – the event system is an important part of the assignment and should be included in the game system. It wouldn’t be too difficult to implement into the game system, it was decided that this needed to be implemented into the system.

Implement Game States – game states are a different matter, with the current structure of the assignment it would be difficult to implement the game states into the game. Additionally, the game states would not add much value with the current game setup. After assessing this it was decided only to implement the game states if there was enough time after implementing the other features.

Ordering and queueing the character actions – character actions are an important aspect of the game and therefore anything that is relevant to the player actions is extremely important to the game. I solved the ordering and queueing character actions fairly simply as displayed below:

private void GenerateActions()
{
    for (int i = 0; i < active.characters.Length; i++)
    {
        if (active.characters[i].HasAction)
        {
            cmdList.Add(active.characters[i].GetAction());
        }
    }

    for (int i = 0; i < other.characters.Length; i++)
    {
       if (other.characters[i].HasAction)
       {  
           cmdList.Add(other.characters[i].GetAction());
       }
    }

    cmdList.Sort((x, y) => y.character.stats.speed.CompareTo(x.character.stats.speed));

    UIController.Instance.DisableButtons();

    active.BroadcastMessage("GoInactive");
    other.BroadcastMessage("GoInactive");
 }

Implementing animations – Animations are another aspect of the game which are similar to models, it can consume a lot of development time and I don’t think are too important. So instead of creating full on animations I would instead put in pseudo animations which are much easier and less time-consuming.

character.gameObject.transform.position = Vector3.MoveTowards(character.gameObject.transform.position, target.gameObject.transform.position, 8 * Time.deltaTime * modifier);
or
character.gameObject.transform.localScale *= 1.001f;
or 
light.intensity *= 1.5f;
light.range += 0.5f;

Character actions to take time – This was fairly straight forward to implement, after creating the action list, it was simply a matter of allowing each action to take time to execute.

void Update()
 {
 if (cmdList.Count > 0)
 {
 var frontItem = cmdList[0];
 if (!frontItem.Started)
 {
 frontItem.Start();
 frontItem.Started = true;
 }

 if (frontItem.Finish())
 {
 cmdList.Remove(frontItem);
 if (cmdList.Count == 0)
 {
 FinishActions();
 }
 }
 else
 {
 frontItem.Update();
 }
 }
 }

AI Implementation – This is a lower priority item, the highest priority was to get the turns and the main character functionality working. Therefore this is a lower priority item.

This week was an intense week with so much assessment and projects that needed to be done. Even though I wasn’t able to complete everything that I wanted to with the assignment I was still able to figure out the most important aspects of the assignment and prioritise these aspects correctly. This is a useful skill to have in industry as we will not always have time to complete every feature we want in a project by the deadline.

Tags:

Leave a comment