1.1c Every session screenshot the outcomes and briefly explain the skill you have learnt. Please include:
Programming - Code Planning (Pseudocode, Flowcharts), Code Structure (Classes, Methods, and Statements), Variables, Components (e.g. RigidBody Physics), Importing Assets, Movement, Pickups, And Instantiation.
What we did:
We got a brief on the building blocks of what actually makes a “game” and what makes a good/bad game. Focusing on mechanics and other aspects. For an example we looked at Candy Crush and played it a bit to decide what aspects of it we thought were appealing and what makes it such a popular and successful mobile game: for example its visual stimulus and constant feedback on how good you are doing. The simple mechanics and open marketing made it appealing to a large audience however on the opposite side the game is so simple and menial it's not that fun or challenging and becomes quite meaningless, like a chore. We discussed and wrote down what were aspects that made a game of our choice. I chose death stranding and was thinking about what you actually have to do, the protagonist, antagonist etc.
Getting the car to move, constantly updating and the movement being relevant to time rather than frames to not have a frame based advantage with speed.
Creating a following Camera, and a proper movement system that uses the players inputs to move the car.
Creating a Boat movement system on the x axis with player input then creating an instantiate-er to duplicate and spawn our moving cannon balls from the pirate ship's cannon.
Moving x axis pirate ship on input, shooting cannonballs on input.
Also use universal movement script with alterable variables to change direction and speed of movement for attached game object e.g movement of enemy ships or cannon ball.
Week 5:
How to destroy an object in unity: Object.Destroy
public static void Destroy(Object obj, float t = 0.0F);
Removes a GameObject, component or asset.
The object obj is destroyed immediately after the current Update loop, or t seconds from now if a time is specified. If obj is a Component, this method removes the component from the GameObject and destroys it. If obj is a GameObject, it destroys the GameObject, all its components and all transform children of the GameObject. Actual object destruction is always delayed until after the current Update loop, but is always done before rendering.
What is an array : In computer science, an array data structure, or simply an array, is a data structure consisting of a collection of elements, each identified by at least one array index or key. An array is stored such that the position of each element can be computed from its index tuple by a mathematical formula, An array is a series of memory locations – or ‘boxes’ – each of which holds a single item of data, but with each box sharing the same name. All data in an array must be of the same data type. (https://www.bbc.co.uk/bitesize/guides/zy9thyc/revision/1)
Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.
To declare an array, define the variable type with square brackets -> string[] cars;
How to generate random number: Random.Range
Return a random float number between min [inclusive] and max [inclusive]
Deletes objects when they go off screen. moving/spawning enemy ships and cannon balls spawned from player.
New Game, jumpy jumpy. Like chrome dinosaur game. player character jumps but doesn't move due to rigidbody and collidors, enemy objects are obstacles and have colliders that detect player. if ground all okay if bad obstacle then game restart with scene reload.
This is when you set the vector to a public/custom component allowing change in direction within unity editor.
Pushes / adds force to rigidbody by x and y amount.
Skeleton vs Sprite based animation:
Skeletal animation is a technique in computer animation in which a character is represented in two parts: a surface representation used to draw the character (called skin or mesh) and a hierarchical set of interconnected bones (called theskeleton or rig) used to animate (pose and keyframe) the mesh.
Sprite sheets are used to create large and complex scenes and gives you the opportunity to manipulate each sprite individually. In generally games use hundreds of sprites and they consume a lot of memory and to avoid this thing are used sprite sheets.
Sprites are a popular way to create large, complex scenes as you can manipulate each sprite separately from the rest of the scene. This allows for greater control over how the scene is rendered, as well as over how the players can interact with the scene. Spritesheet animation is nothing more than taking a spritesheet and changing which sprite is rendered in quick succession to give the illusion of movement, much like a film projector displaying a movie.
skeletal animation uses tools that makes the process of animation easier
skeletal animation allows you to create dynamic animations because you can manipulate (rotate, translate, scale) all character’s bones at run time
bone-based animations are easier when you want to make multiple animations for one character
skeletal animation requires a fewer images and less memory
skeletal animation allows you to make natural movement with the help of inverse or forward kinematic
with sprite sheet animation all your data are contained in one texture
sprite sheet loads quickly
sprite sheet reduces the amount of draw-calls on your GPU and this means a better performance
with sprite sheet you can render multiple things in a single draw call