SGD300 - week 3 Devlog


Introduction

This class uses Unity, C#, Trello, Bitbucket, Itch.io to develop a game as part of a development team looking into recreating Dungeon Siege. 

Goals

1. A Player controller that links to a Point Click Movement Script and a basic State Machine that can set AI player behaviour. 

Personnel

Primary - Nathaniel Hughes
Secondary - Liam Nolan
Secondary - Keanu Brown-Duthie 

Technologies, Tools, and Resources used

Provide resource information for team members who wish to learn additional information from this log.

* [Click to Move Example One](https://www.youtube.com/watch?v=EAiV7gZv69M&list=PLaKASd7MJVnzlqFAnOndK4gJ2aXp--23J)
* [Click to Move Example Two](https://www.youtube.com/watch?v=GANwdCKoimU)

* [Character Controller Manual](https://docs.unity3d.com/Manual/class-CharacterController.html)

Tasks Undertaken

Show only the key tasks that will help the developer/reader understand what is required.

1. Update Unity  to release 2018.3.6f1
2. Create new Project as sand box to explore programming problem
3. Create a sample movement script following example from youtube
4. Remove the input from movement script and create a character controller script to handle the input
1. Save my controller script to bring to class

What we found out

The Input Player controller will handle all input provided by the user, therefore it will be linked to many accompanying scripts, where input will be needed from the user for a function to happen. For this week I created a dummy Click To Move script so I can provide a working controller to present in class.

The Click To Move script has  3 variables, a float called speed, a reference to a CharacterController called character controller and a vector3  called position. It has two methods Locate Position and Move to Position. The locate position uses a ray cast to find the position where the user clicked by using a ray. The move to position users that locate position to calculate the distance between its current transform and where the user clicked before turning in that direction and moving there if the distance between those two points is greater than one.

The Input Character Controller script handles the user input. The script has a reference to the movement script and takes a bool and checks of the button has been pressed and then passes the methods from the movement script when the button pressed down is true.   

Solution Justification

The Input Player Controller is an important script to any game because handles all the input provided by the user allowing for all the underlining functionality that users that input to stay the same in their own script. This will allow for the controller to be altered to handle any special cases where other character require different functions to be added without affecting the other characters by having to completely change how that character operates.

Get SGD300

Leave a comment

Log in with itch.io to leave a comment.