Posts

Final Game #4: Conclusion

The final game that I have produced is called Gravity Shift . The game is a 2D Platformer Game revolving around changing gravity. The player will progress through levels, avoiding obstacles to reach a checkpoint, while using the gravity switching mechanic to help. In my final game, I have included common features of platformer games, such as lives, coins, moving platforms and triggers. Introduction: I chose to produce a 2D Platform game, because I enjoy playing that genre of games, and felt I would have fun producing this. I took inspiration from games such as Super Mario Bros and Sonic the Hedgehog for concepts such as harmonic motion platforms, coin pickup, lives/hearts, and end of the level. What went well: In my game, I feel that I have been able to demonstrate a range of different physics mechanics demonstrated in class, along with another physics mechanic which was not demonstrated in class. In total, I feel that I have demonstrated ten concepts in total: Distance 

Final Game #3: Friction Resistance, Momentum and Local Platforms

Image
Friction Resistance: In my game, I have included some sloped platforms which are affected by a friction resistance. Friction is a force which resists the movement of an object. A force is added to my player's velocity which is calculated by the Cross Product between normal of surface, and the downwards Vector. Script used for the friction resistance Momentum: In my game, I have included a series of bouncing spherical objects which can lose momentum over time. In the animated clip, you can see a red object slowing down and losing momentum over time, before stopping completely. Script used for the momentum of bouncing objects. Local Friction on Harmonic Motion Platforms In my game, I was keen to add a feature to allow the player to be able to jump onto a harmonic motion platform, and allow them to move freely on it.  The game has been programmed, so the player becomes a parent object of any harmonic motion platform. This means the player can keep

Final Game #2: Harmonic Motion, Projectile Motion and Buoyancy

Image
In this blog post, I review some of the advanced mechanics which I have implemented into my game. Harmonic Motion Harmonic Motion is the concept of oscillating motion, where a force is proportional to the displacement of the equilibrium (starting) point. Within my game, I have included several harmonic motion platforms which move horizontally (left-right), vertically (up-down), diagonally (top-right to bottom-left) and in a circular motion. The below example demonstrates harmonic motion in my game, which is a white platform moving in a circular direction. The Harmonic Motion script. The Time*speed needs to have a constant increase over time. Circular Harmonic Motion. Top is Game view; bottom is scene view Projectile Motion Projectile Motion (also called Parabolic Motion) is when an object is being thrown towards a specific curved path, at an angle. Within my game, I have implemented a cannon which shoots enemies out of a cannon at a pre-determined angle.

Final Game #1: Distance, Displacement, Acceleration, Velocity and Gravity

Image
In my final game, I intend to produce a 2D platform style game where the player can flip the gravity, and travel on the floor and ceiling of the game. The basic movement and gravity mechanics will be controlled by the physics mechanics described below. Distance: Distance is the measurement of how far apart two objects are. This is calculated by the square Root of (x2 - x1) 2  + (y2 - y1) 2  + (z2 - z1) 2. . In the game, the player can track their progress throughout the level. The counter will help the player work out how far away they are from the end goal. This can be useful if there are different paths to the end goal. In the script, I take two Vector3 components, and subtract the X/Y/Z axes between each other. I then get the power of each axis, and get the square root of the values added together. Formula: SqRt( (x1+x2)^2 + (y1+y2)^2 + (z1+z2)^2 ) Displacement: Displacement is the motion of moving an object from one position/vector to a second position/vector

Week 7 Practical

For our week 5 practical, I needed to create a scene with buoyancy enabled on a water based object, following a lecture based on elastic collision and buoyancy. Buoyancy: Buoyancy is an upwards reactive force applied to liquids which counteracts the weight of an object. Gravity is pushing an object downwards (based on the mass), and the density of a liquid is pushing the object upwards. Elastic Collisions: Elastic collisions means that the collision of multiple objects are not affected by momentum (amount of motion on an object) or kinetic energy loss (loss of energy on a moving object). My Scene: In the scene, a bullet spawns on a key-press from the orange cannon. The bullet becomes affected by buoyancy, based on a random mass and volume. My Scripts: Properties Dynamic Objects Shooting

Week 5 Practical

For our week 5 practical session, we were asked to produce a scene which took the concepts of forces, slopes and gravity. In this scene, it demonstrates the use of gravity, acceleration, local forces, slope, and object mass. The scene included: A player character (as a yellow cube) with gravity, acceleration . Two red platforms with harmonic motion Two green platforms with random friction coefficient Two blue platforms with random slopes on the Z axis The video demonstrates two run-time sessions of the game: Slope angles on Z-axis: -7.43 and 1.65. Friction Coefficients of 0.96, and 0.80. Slope angles on Z-axis: -19.35 and -9.90. Friction Coefficients of 0.509, and 0.506. Codes: Player Movement Friction Coefficient Random Slope

Week 3 Practical

Image
In my Week 3 practical class, I was asked to create three different scenes which reflected the addition of gravity, jumping, inertia and acceleration. Scene 1:  My first scene is a 2D race mini-game where the user (cube) races against two AI cubes. The AI cubes have random acceleration and max speeds, which remains constant throughout runtime. The player control can stop with inertia by releasing the movement key (KeyCode.D) or by pressing the space-bar. The script includes capping the Velocity and stopping the movement progressively. This scene demonstrates the concepts of Movement on a single axis, Velocity , Acceleration and Speed, and Inertia . Scene 2: My second scene is a mini-game where the user controls a spaceship (cube) which flies across the world. It uses a Debug.DrawLine to show the distance between the current position and the intended direction (calculated by Velocity * Time.deltaTime). This scene demonstrates the concepts of movement on multip