Week 3 development
PROGRAMMING
The main concern this week was getting a very (VERY) rough vertical slice for the next week's tutorial, hence, we tried our best to implement the full game loop. To achieve a complete game loop we have implemented 3 main things this week: spawners, time tracking, and crafting.
Spawners were quite straight forward, when called upon, spawns robots into the scene. Each spawner has multiple sets of data. These sets include what robots the spawner should spawn, how many it should spawn, how frequently it should spawn, and how many robots from this spawner should be in the scene concurrently. The spawner will decide which set to use depending on what day it is, making it easy to customise each one separately and tailor them for each day.
Time tracking was implemented in two parts: actual tracking of the time, and displaying time to the player. For tracking we have created a singleton class that tracks the time and can be accessed by other classes. We also created a class called TimeFormat, which describes how long the day is and how fast the time should move. For displaying time we have implemented sun movement and the change of sun's colours throughout the day. Colours are customisable.
Crafting was implemented this week programming wise, however not gameplay wise (same for the UI). Thus far there is only one recipe and it is quite silly. The monkey can make a rock out of a plank using another rock.
MODELLING
Things that were modelled this week are the melee robot, the knife, the broken blade, the pike, the stick, the pistol, and the buckets. The pistol and the knife were modelled by mirroring one half of the model and extruding as needed. To model the broken blade the knife model was copied and the handle was removed and replaced with a much thinner piece. Similarly to the broken blade, the pike was modelled by copying the knife without the handle, it was then combined with the stick model. The new models can be seen below.
Textures were added to models. This includes the items modelled this week in addition to the fruit, the ranged robot, the plank, and the vent. Most textures were made by downloading a base texture online and changing the colour. Metallic and roughness (opposite of shininess) attributes were then added to the texture.
Some textures such as the fruit skin texture were more or entirely procedural. This involves mixing together various ‘noise’ textures (semi-random patterns) and then applying colours to the combined texture.
In order to move the model materials from Blender to Unity texturing baking was used. The first step of this is UV mapping. This involves unwrapping each face of the model onto a 2d image texture. After that 3 images were made: a colour texture, a metallic map, and a roughness map. The colour texture is the colour of the model, the metallic map is how metallic parts of the model are, and the roughness map is how rough parts of the model are. These were then added to a Unity material which was applied to each model. The textured models in Unity can be seen below.
Animations were made for the ranged robot and the melee robot. This includes melee, and idle animations, as well as movement and alert poses. The alert poses are the poses shown above for the textured robots. Movement poses just lean into the direction of movement. Melee and idle animations can be seen below.
The melee animation for the melee robot also has a mirrored version of the animation where the other hand is used. To activate the animations in Unity an animation controller has to be used. This involves creating a ‘state machine’ where each animation has connections to other animations which activate depending on variables such as speed, or if the robot is alert or attacking. The controller can be seen below.
Lab Banana
More posts
- Final weekOct 13, 2023
- Week 5 developmentOct 10, 2023
- Week 4Oct 06, 2023
- Week 2 developmentSep 19, 2023
- Week 1 developmentSep 05, 2023
Leave a comment
Log in with itch.io to leave a comment.