The task at hand is making on the ability to switch from the person to the boat and control them. Unity is really good at this as you can turn off individual things in the scene or in an object. You are able to find an object in code and find features in the object and turn the on and off. I will be using this ability to make it so you can switch through the person and the boat. You are only allowed one active camera in a unity scene at a time. When driving the boat I will turn off the camera on the FPS Controller and make the camera on the boat active vice versa.
When the mode is switched to boat, the camera on the FPS Controller will be turned off and the FPS Controller will be set to the position of an empty object on the boat, the empty will be a child of the boat so it will always be at the same place on the boat every time. When you get of the boat I will also turn is kinematic to off so the boat does not move off when you dock on the island.
As a stretch goal, I am planning on making it so you can only get off the boat when within a radius of it. I currently do not know how to do this so I will have to do some research. Currently the code is limited to using 2 different keys to get on and off the boat and there is no radius. I also want to implement a radius to the boat and the functions. I feel once I have learnt the radius code I will be able to apply it to a few things throughout the scene. I would also like to have the on and off button for the boat set to the same key but currently do not know this either.
I have made some coding progress. I have been updating and adapting my ship movement to be more boat realistic. I have made it so the boat is no longer able to move side to side using arrow keys as it was not a realistic movement for a boat. I also made it so you now control the boat by changing direction of the mouse. You were able to look 360 really fast. I now changed it so you can only look left and right. This is because the camera is in a 3rd person view and it is not needed to look in the other directions. I had set the turning movement to be extremely slow this is to also add realism to the movement.
My next steps are to Make it so you can get ‘out’ of the boat and move the character about. I have found a resource which will help me achieve this. The college will not let me unpack the standard assets so I am limited from certain things like adding real water. I am going to focus on the two separate movements the player and ship movement before I then proceed to work on other goals like an upgrade system.
For part of our group synoptic project we have to do a blockout which is basically a plan of everything and where everything will be going this is to establish a sense of scale and be able to pickup on some potential errors that may be an issue in the later version. This is also a great time to focus on level design.
I started off by making the low poly island in Maya using the triangulate tool to make it a cube into triangles, first off I made the cube and made it substantially bigger than the starting cube (*25) I then inserted edge loops and found a number I was happy with. I then proceeded to use the triangulate feature. This halves the quads into tris. Using the soft select feature on Maya I selected a certain vert and pulled it up making it land that is rising out of the ocean. I done the same process for the waves but I did not make the difference as high as the island and I went down in a wave formation
This gif displays the basic movement I have currently got. However we aim to make it a lot bigger where you start off in a boat and you are able to leave it at the islands and walk. This is just some movement, I would like to improve on it by making the mouse steer it but this is just the beginning.
I have been given the task of coding so far I have been working on side things like making a logo doing research. I found a lot of images close to the style we want and this is good to keep focused onto the art style we want. The others have been doing some concept drawings and making some plans for the items we may have.
Both my coding and Unity knowledge is fairly limited for many reason, It has been a while since I used it and really I never knew a great deal. My task for the team will mainly involve a lot of research as I need to research what I want and work with what I can find! I am hoping as time goes on I build a better understanding to code and it becomes easier for me to code and hopefully I will be able to recite the code without needing to research.
As of now my task is heavily research based. have been looking into some code and I have successfully been able to setup movement mechanics and I have attached the camera to the cube which will later be replaced into a ship. This is just a blockout. I also added a script to the camera so it finds the cubes position and follows it, I then added an offset this is so you can see the cube/ boat from a 3rd person perspective.
We have also done some character research and one of our members has made progress on making some natural objects like trees. Following the low poly style so it fits in!
Coding is one of my favored classes in NextGen I enjoy making things work and trying to make it more efficient and simplify it. I have been working on a 2D game where you can shoot enemies as this is part of my assessment which is very near. I decided it would be interesting to find out differences between shooting an object in 2D and 3D. I loaded up unity and made a camera and a base platform.
Currently the camera does not move but it is still my player. I then made a prefabs folder and a scripts folder. I then made the sphere in my scene and added a rigidbody on it then I put it into my prefabs folder so it would retain the properties I put on it.
Currently the ball spawns upwards and balances on top of each other I am working on fixing this. The code spawns the balls with a velocity.
I have decided to try and make and archery game, so I drew up a list of some assets I may need to make and use though the game. The assets were quick sketches not really high detail but enough for you to be able to see what it is.
Obviously you will only really need the bow and arrow, but I felt it would look cool if there were other weapons on a table or being presented or perhaps scattered around the environment to secure the time period which would be medieval.
There is a viking helmet, Syth, sword, shield and battle axe.
For the game there will basically be a shooting range where the character will be shooting the arrows down a firing range and hitting a moving target. The targets will disappear after a period of time and re appear shortly after. I plan on adding a UI so you can keep track of score. The firing range will be a field so I have researched how to add grass to unity, the grass is a 2D texture which is just made in layer. i could have it slightly 3D If I were to use Maya’s grass. Too make the game a little bit more eye pleasing I will add terrain surrounding it so it looks like you are in a ditch to stop you seeing over a completely flat plane.
For my assessment prep I have been working on the 2D Top down game, previously I have been stuck with the enemies that stare at my player though the walls. this was an issue as I was instantly dying as soon as I left the cover due to the rain of bullets upon me. I have been sifting though lines of code and I have found a way of making the enemy follow his waypoint path and only shoot on these axis. This is much better and looks cleaner as even though walls the enemy was always looking at my character.
I removed the ‘Trig2 Rotation’ script as this was what was controlling it and added these 3 lines of code which when broken down make the enemy focus/ aim towards his next way point. This is more eye pleasing and simple put its a lot better.
For Ant and our assessment we needed to make a top down game, for this I have 2 enemies and one player. I added the movement script to the player allowing me to control him moving him with the WASD Keys. I then set the way points for the enemy to travel to. I realized there was no exit to the map so I added a portal and then added an auto rotating script to it to make it look better.
The bullets the enemy shot were going through the walls, this was bad as they would go through the walls and kill me as the enemies are always looking in my direction. I then added an OnCollision feature which meant when it collided with things it ended the game, the only thing was when the bullets hit the wall it ended the game. I then made it so when the bullets hit the player it then ends the game, I also made them collide with the walls so the bullets did not go through the walls.
I need to change the characters to the ones with the guns but I feel the code is more important at the minute due to the upcoming exam.
For this game I had done quite a lot of work, there was initially a start screen when you open the game. After you press on the play button it would then load the next level I had used the UI System in order to achieve this. I had added code which detected the mouse click by using ‘on mouse down’
A few things had went wrong at first I had found it difficult to navigate the scene management making it possible to change levels. As you have to use the builder menu to load in each scene after I had wrote the code to change the scene I then had to change it on the next scene to then take me to the second level.
I had made the meteors go into an elliptical path which was because this is how it occurs in real life, I also added a rotate script cause meteors rotate as they move through space. On the first level I had used the stock images and attacked the camera to the ship. Which had a polygon collider assigned to it as I could adjust it to actually be the shape of the ship. Unity done a good job at doing it automatically so I didn’t even need to change anything. The stock images looked quite poor so the second level I had used my own space themed images I had gathered.
As the camera is attached to the ship it means as you spawn you can see the outside of the map and it looks poor so on the second level I had added a Sci- Fi background to it to make it look little bit more eye pleasing. I also added a collider around it so you could not exit the play region.
I added a timer to the maps as well so if you were finding it too easy it added that little bit ore pressure. After the timer hit 0 the level forces a restart. I had made the timer by using GUI Which I was surprised it still worked as this is old unity. I also added a death script to the meteors so once you collide with them it also forces a restart.
I decided to add a more complex movement path for another enemy, this was to make the level seem more difficult by having more then one enemy to kill. The aim it to kill one while the other is not looking. The enemy goes out the room and then goes into the cupboard this is supposed to be the time to kill the other enemy the aim is to time it perfectly so once the enemy goes into the cupboard the other enemy will be near the entrance allowing u to discretely kill him.
After you kill the first enemy you will then be able to continue by killing the second one. I plan on adding obstacles to make it easier to kill the second enemy silently without being seen. Currently you do not die and you are not able to kill the enemy but I plan on adding this soon.