Sector Defence: the last team update

Me and my team have mostly been communicating via online services like discord over the past couple of weeks due to the fact that we haven’t been on time table so we’ve been at the college at separate times in the week, I have however seen both Matt and Lee at two separate occasions. Me and Matt mostly hadn’t talked about the project and instead focused on talking about games and the games we plan on developing over the summer. Me and Lee discussed a bug he had found in the current build of the game which I had informed him I had fixed in a version I have at home. Overall the production of Sector Defence slowed down a bit since the portfolios were due in. Other than that, I have only had contact with Tom, Billy and Steven through a discord server we have for our group however they have been putting work into that so I know that it has been getting done. Overall, I think we are having steady progress towards the end of year show that I think will show there.


Character stats in Sector Defence


These are the variables used for the stats for both the player and the enemies in the scene. First we have the health and max health which speaks for itself. Then we have shields which at present isn’t being used in the product however soon I may change that. then we have attack power which is how much damage the weapons do for that object. then we have two bools that determine whether or not the object is a player and the other one is asking if the enemy is part of an objective such as the rocks that break at the end of the first room or the enemies in the last room that trigger the end of the game. the health bar is something used exclusively by the player and is how we track the health on screen. Then we have two game objects, the first is called player but is actually just the objective that the object concerns. The next is the explosion that activates when an enemy dies to indicate their death.

take damage.PNG

This is how objects in the game take damage. When they are hit by a projectile this function is called with damage being filled in with that objects own value. This is pretty simple, for as long as the player has no shields they take damage directly to their health, if their health is below 0 then we trigger the game over function, if the object with less than 0 is an objective then it adds to the objective counter of the object they are connected to and destroyed and if none of these is true then we just destroy the object and make our explosion bar and gameover.PNG

The next step is pretty simple. The fill amount of an image is based on 0 – 1 which is how we display the HP so we just divide the current by the max so give us a value between 0 and 1 which we can apply to the health bar.

Next is what happens when you the player dies, this loads a new scene which is currently the scene the player is currently in.

Overall, I am quite proud of this because it is quite clean code that I think is quite easy to read and explain to my team mates.


Today I finished my portfolio (available here: To make this I took footage of the 5 games I have built over the past two years and I made a video showing elements of all of them running. I started this with 35 minutes worth of footage and I managed to cut it down to 5 and a half minutes. I overlayed the footage with an acoustic guitar song. I did this because of how it is a look back onto my years on next gen and it matched the mood I was in at the time of editing it.

Overall I am proud of this, I am not great at editing however I do feel that this video does help overview my time on this course and shows what I am capable of in the present, I only plan to improve as I make more games over the summer and through university.

Fixing movement for Sector Defence

Presently there has been some problems with how our movement works in sector defence, there is a constant problem of it not feeling right so I’m putting time into putting it right now. To make it feel better we need to make so that the ships flying feels floaty, so you don’t just start at a max speed and keep going at it, you need to have a acceleration to the ship as well as an obvious turning circle, to make it feel like you are controlling a ship.


To start, we have the variables. There isn’t many for this script. All we have to determine is how fast we want to rotate, how fast we want to speed up, how fast we want to cap the player at and finally what object we are effecting.


As the game starts, all we do is tell the game what the rigidbody is to let us be able to control the player.


Most of this hinges itself on the rotation part of this script. To start we take the direction the player is pointing the left stick in and store this as a Vector3 called direction. We then make a step which is essentially how fast the player will turn which we have made our rotation speed multiplied by the time step set by the engine. Next we make another Vector3 which we will later set our rotation to, this one just helps us go from the direction we are facing to the desired direction we want to face. This all happens over time to make our turning circle.


Next is the movement itself. This one is a pretty simple part of it. At the top of this we check if the player is making any input on the left stick, if they are then we add our acceleration to the force pointing forward so we move forward. Then we check if the player is moving faster than our max speed using the magnitude of a Vector3 which is basically the length of it, if they are moving faster than it then we set our speed to the max and keep moving.

We then call the Rotate and Move functions in the update so that they are called once a frame, this will hopefully keep the game running smooth and make it feel good.gif04.gif

please forgive the quality of the gif, I couldn’t get the software to behave properly. Overall, I am happy with how this looks now, it is starting to look and feel nice, nice enough to be proud of with the amount of time put into this one item.

Synoptic Project: In retrospect

This project was riddled with problems from its conception. When we started the project we had 7 members, myself, a designer, an artist, an animator and 3 3D artists. This team seemed to be a one that would surely make a good product as all the modelers showed real promise of making good work and looking back on their previous work, they had made good work in the past. Both myself and the designer  had worked together in the past and had been pretty proud of our past works, the 2D artist was a good friend of ours and talented in his own right so from the beginning everything seemed to work except the animator who we had never seen any work from or even talked to. In the first meeting with him he discussed his discomfort with being put down as VFX so I offered to source the VFX which led to me being responsible for the VFX, programming and importing assets when I had only had experience programming so from the beginning I was overwhelmed with different areas of the project that I wasn’t ready for.

The first few weeks of the project I spent attempting to learn the animator and the shader systems in Unity.  I needed these to make the project visually pleasing and to properly import all the assets from each team  member. It was after I showed off some ability to import a moving object into Unity when we noticed a recurring trend. This was that no one had seen or heard from our animator and it took us too long of making objects animation safe before we settled on the fact that our animator was probably not returning. This took way too long and took away a lot of time from our heavy deadlines which left a huge dent in our project that is still visible in the project in its current state. Now all movement and rotation is coding based and doesn’t look as good as it should.

The next problem we faced was movement. As new Unity versions came out and the physics in Unity were slightly tweaked, we would import into the new version to see our movement completely broken and I’ve now spend at least 20 hours (if I’m being generous) fixing the movement over and over again to it not being as smooth as we would like it in the current state however I know how to improve it to make it more exciting but that would be sinking more hours into reworking it now. This however can be remedied  due to the fact with a bit of research I do believe that I can fix this issue (another blog post about that coming soon).

After that, the problems provided into the group have been relatively minor. This project whilst troubling has been a good learning experience, I have learned a lot more about asset collection and working as a team, I wish I could have improved on the earlier part of the project though. There was a lacking organization back then and a genuine fear on my part that I couldn’t do it, I let that hold me back and that is solely my fault, so for that I apologize to my team for not being good enough.

How the player wins in Sector Defence


These are the variables I have used for objective script for this game. In order we have the amount of enemies needed to complete this objective, how many have been killed, what level we go to, a question of whether this is the players objective and finally an explosion used to break rocks.


This part activates whenever the player has defeated enough enemies. Depending on what it is it either goes to the win function which takes us to a win level, otherwise we just destroy an object which is normally an obstacle in the level.

This works for the project and I don’t think anyone in my group minds how I’ve done this.

Projectiles in Sector Defence


This is the variables needed to make the projectiles in this game work. First of we have the rigidbody which is what we need to make the projectile actually move. Next we have a fire power with a default value of 4, this is what we use to determine how fast the projectile should move. Next is the life span which is a timer we use to make the object be destroyed after it runs out. then is the damage done which is how much damage will be done on collision. Then we have two bools to ask who it is being shot by. Next up is the particle used which was later made into our explosion effect. Every value after this is made to make the screen shake.


The start function is pretty easy to understand here. We use this to set a speed for our projectile, identify the camera and take the rotation of it for use later.update.PNG

All our update function does is remove the object from the game after an amount of time, we do this mostly for optimization reasons.


This is what happens in our game when we collide with an object. The general idea is that the object we hit takes damage and then we get rid of the object shot.coroutine.PNG

Lastly, this is a coroutine that activates when the player is shot that shakes the screen to make some feedback towards the player to help them realize that they have been hit.

Overall I think this is pretty good however whilst writing this I saw a couple of problems that I will go to fix after this.

Diving in Sector Defence

One of the unique features in sector defence the player has is the ability to dive, this works in a similar way to how a dodge works in a normal game, it exists as a method to avoid enemy attacks and to get around some obstacles. variables.PNG

The variables in order are used for how far down the dive is, the time you are dived for, checking if you are diving, the original place and a value to set the place at, a time regulating value and the rest aren’t used much anymore.start.PNG

The start function is only used to set values used later on in the script. There isn’t anything else to say about this part.update.PNG

The update function is pretty big on this one. Its pretty simple to explain. In layman’s terms all this function does is when the player presses the left trigger their character will dive then after a time they will resurface so long as nothing is above them.

I think I didn’t do as well with this script, it was one I made during the prototype and because of that it is a bit messy and hard to use. In the future, I need to improve this so other people can actually use the scripts I create.

Set Dressing

A part of the MVP feedback was that the scene was boring due to the lack of models I had put in from team workers, so this post is to show what set dressing has been put into the first level of Sector Defence.

This slideshow requires JavaScript.

I quite enjoy placing these crates, they can be seen at many parts of the level and imply that there is a reason to be storing something here in this canyon, I like building this idea that something valuable exists here.

This slideshow requires JavaScript.

I am also really enjoying placing theses rails throughout the level that block your path and also imply a sense of direction, I like to imagine that the cart that travel with these moves the same direction that you do throughout the level, this gives a good sense of flow throughout the level.


Lastly, at the end of the level is these transport vessels implying that whoever is mining here has something that they are taking away somewhere, creating a mystery over where they are going and why.

Overall, I’m really happy with the 3D team that made these assets and I’m looking forward to seeing more from them for future levels.

MVP review

The MVP has passed now and the feedback we got will be useful in completing this project.

“You’re progressing solidly and the majority of what the game will eventually be is evident. It’s not a “complete” product, however, which is the point of the MVP. Prioritise “finishing” a base game this week that would pass the synoptic project and then work on improvements. As for those improvements, make the ship feel, fly and control more like one – add inertia, a larger turning circle, etc. You could also mix up the view to see what feels more intense, make the camera drag a touch behind when you’re moving quickly, shake it when you shoot or even subtley rotate it at speed. The extra mechanics such as pulling obstacles out of the way will add some much needed variety too, so implement them as soon as you can.”

This is the feedback I was given for the MVP. Since then I have made it so that the players bullets will explode on impact with the players and when the player is hit there is an explosion and a slight screen shake design to make the action more exciting for the player. I have also started changing the player movement to make it more fun to play our game.

From this I can also gather that this project needs some improvement so I will do everything I can to make sure that this project gets the grade it deserves from here on out.