top of page

Inheritance

In this lesson, we talked about programming languages to be able to tell a machine what to do in order to create a game.  We were introduced to the 'C++' programming language as it will be the source of developing a game. We started by exploring two pictures of cars: one is stylised and the other is photographed to look at their general such as driving, reversing, breaking down accelerating features and specific features such as shape, wheels, abilities and etc by focusing on 'Allegro' class cars in general to then move to the other section by finding out how many particular 'Allegro' cars were made. This example showed that in some programming languages such as java or Lua there is no distinction between class and instance. C sharp distinguishes between class and instance, where the class is a kind of template building things and the instance is the particular thing we build. As a group, we have tasked to think-choose the images which could be linked to the transport. We came up with ideas such as horses, humans, birds, boats and other transport modes including fictional examples such as teleportation and starships. 

Starting Scripting

Message Scripting

Debug.Log("Hello World")

This script is about making a massage when you click the 'play' button. So, basically, when you click the 'play' button a message will appear. Following the teacher's guidance, I used how to code to create massages. The image on the right shows the coding I had made. 

Message Constantly Scripting

Debug.Log("tick tok")

This script made is similar to the previous however it here the message is repeated.

Starting Scripting

This script changes the position of an object on either the x, y or z-axis based on the numbers you choose. It is shown in the image on the right. 

moving Scripting

in this script is shown the code for an object to move. The 'F' code supports decimals numbers and indicates the low magnitude of the speed.

Speed Control Scripting

This script shows how speed can be changed whilst in gameplay. . When you are in play mode and wish to change the speed you simply make changes in settings. 

Prototypes

We brainstormed ideas for games, consoles, and other items for this collaborative project and looked for prototypes online. This exercise allowed us to investigate the earliest or preliminary versions of the ideas we had. We next discussed and wrote down our opinions about how we perceive the meaning of prototypes.

Mechanics

Red dead redemption 2

Minecraft

Valorant 

Pseudocode and Pacman

Make A Tea

step 1 is to fill up water in a kettle and switch it on

step 2 place the teabag in the cup, wait for the kettle to boil

step 3 fill the cup of kettle

step 4 remove the teabag then add milk

step 5 add sugar and stir

step 6 drink the tea

Pacman Design

Within a group, we created the game Pac Man using a variety of items to explain how it works, recreating the maze-like map. We made sure to use items with a variety of colours each representing a different mechanic of the game as shown by the key in the images. 

We detailed what each aspect's purpose was for example the black lines that represented the walls blocked movements needing another path to find. We did this each for part of key as shown in the image left this allowed us to plan for the coding. 

Pacman Coding

As the image above demonstrates we considered what goes into each mechanic and the coding that would be needed to be completed in order to fulfil these aspects for example making the pellets disappear when obtained by Pacman.

Pacman Stage

Level 1

Final stage

As shown in the left image we used our previous work to create a rough outline of a Pac Man stage, including the pellets, ghosts and other mechanics listed in our plan. This allowed us to create an idea of what the final stage would look like.

Transforms and Instantiating with Prefabs

Transportation

Screenshot 2022-05-12 140714.png

This video is shown the script where the cube is moving forward on the X-axis to X5. When it reaches the given point it transforms the position back to 0. If the transform position is greater than 5, the cube will be transported to the position it was. For changing direction and reverse, the position has to be opposite - (-5). The image on the right shows all the details of what was explained. 

Transportation In 3D Dimention. Speed/Limit

In this video, the cube is moving as it was described above with one difference as more axes were added. It allowed the cube to have more opportunities to be transported in different directions giving the sense of 3D dimensions. If you want to manage the speed of transportation, you make changes in the axis up to any number considering the limit, whether the cube moves further or closer on the axes. The image on the right shows the detailed script of the actions in the video.

Bouncing Back And Forward Limit/Speed

In this video, the cube is moving on the X-axis and bounces back and forward with the given limit which affects the speed of cube movement. If the given length is short, the cube moves constantly quickly or stops. If the given length/limit on the x-axis is long, the cube goes a farther distance with the opportunity to control the speed, whether it goes faster or slower. The image on the right describes the script in more detail. 

Bouncing Back And Forward In 3D Dimension.
Limit/Speed And Colour Change

The cube in this video moves on the 3D axis and bounces back and forth with the provided limit, which determines the cube's speed. If the specified length is too short, the cube will either move constantly or stop. If the length/limit on the 3D axis is set to a large value, the cube will go a greater distance with the option to modify the speed. When the cube approaches and contacts the specified place on the 3D axis, it briefly changes its fundamental colour from black to white before returning to black. The graphic on the right gives a more detailed description of the script.

Design Thinking

Player Personas

Player Personas: Battle Royale (padlet.org)

In the session, the task was to create a persona for a battle royale game player. The image above shows a chart, describing the characteristics of my created persona was important to talk about his: likes, goals, motivations, and personality among others. This allowed to gather information of the general opinions of battle royale gamers and understand how to appeal to them, utilising the fake persona of 'Sam'

Player Personas Questioning

This questionnaire with targeted questions was designed by me to interview my created persona, 'Sam' to find out what exactly attracts him to the battle royal game. It will help me in gathering the needed information to further develop the battle royal game which will suit people like 'Sam'.

100 Idea Battle Royal

100 idea battle royal-1.jpg

5 Idea Battle Royal Mind Map

Picking 5 games from the 100 I had brainstormed previously, I created a battle royale mind map: detailing the features each would consist of. I found this mindmap inspiring and fascinating for creating a battle royale game allowing me to understand the genre a bit better.

Battle Royal Storyboard Gameplay Idea

Exploring my 5 mind maps above, I have chosen 'Pistol Show Down' which I liked the most. The mind map for this game which I created previously, helped me to design a storyboard of this game where I used simple sketch images to retell the story of the game.

Instantiation and Trigonometry

Spawn Cube

This video is shown how the cube was generated and how it appeared. It is also shown how it was cloned. For the cube to appear, you need to select the shape first and then link it to the 'cubeManager'. The cube will be generated and will be cloned. The script on the right describes all the processes. 

Spawn line

Screenshot 2022-05-16 102139.png

The code displayed above sets the position of the cube, this cube being created with instantiate function, int. This function takes arguments for a game object and transforms and rotates as indicated by the 3D variable, Vector3, which stores 3 values (x,y,z). This code allows the cube to spawn as a line.

The Shape Of The Stairs

Screenshot 2022-05-16 102550.png

In this video, the cube appears, however adding a slash (deciding in the code language)  next to 'i' with the number and 'f' (float) on the Y-axis,  leads to the cube appearing in the shape of stairs with the longer lines.

The Shape Of The Stairs With The Smaller Elements

Screenshot 2022-05-16 102813.png

This video is the same process as above, but this time adding 'Z-axis and placing 'i/2' on it allows the cube to appear in the shape of the stairs where the elements of the stairs are smaller in size. 

The Shifted Stairs

Screenshot 2022-05-16 105933.png

This video describes the same process as above, but this time adding 'minus' on the axes allows to create the stiffness of the cube. It can be seen when the camera is changing its position and the effect of bumpiness can be spotted.  

The Random Spawning.

Screenshot 2022-05-16 110412.png

This video shows the random spawning of cubes as it is seen in the 15-17 lines in the script, in vector3 a Random.Range (-5,5) in axes, so when you click play it will appear in different position. 

Gradual Spawning

Screenshot 2022-05-16 113432.png

This video shows the same process as it is described above, but in this case, the appearance of cubes is happening gradually with time. The line 18 in the script describes the process.

Spawning And Destroying

killme.png

This video shows how the cube appears gradually and then destroys itself in one second. The script on the right explained the process of destroying.  

Timed Destruction 

killstay.png

The video displayed shows the cube appearing as it is moved and then destroying itself after 1- second as shown by lines 18 - 22 of the script. The cube initially spawns in the middle however it is coded to destroy itself therefore it has to be moved in order to remain visible/ to players.

Spawning Using Trigonometric Functions

cuil.png

Using the trigonometric functions of Sin, Cos and Tan I created a range of values for my x, y and z axes, this script caused the cubes to spawn in various positions, and gradually form a circular shape around the centre.

Nav Mesh, Singletons, Ray Casts

Navigation Ai

This image shows how the AI is depicted as a player or an enemy. What is established as an Ai is displayed in detail on the right, as well as what will follow/chase it or move it. If it's in a light blue box, it means the AI can move around.

Chasing/Following The Target By Enemies

Enemy.png

this video demonstrates how the enemies represented by purple cubes are chasing/following the target which is represented by a white sphere. The script on the right is shown in detail what is established as a target and what will follow/chase it. 

Player Movement 

player.png

This video describes how the player which is represented by a blue cube is moving on a platform in set directions by using the mouse with the left click. The script on the right shows in detail how the player moves. For the player to relocate I established the code where the left button on the mouse should be clicked. When a certain place on the platform is chosen by clicking on it, the player will move in accordance. 

Whitney

Spawn Sphere

SpawnSpheres.png

This video shows how the sphere appears by clicking on the 'play'  button. When the 'play' button is pressed, ten spheres spawns in the middle of the space. The script on the right describes the process in details.

Spawn Sphere line

SpawnSpheres1.png

This video demonstraes the appearance of ten spheres in the line and they linked to each other as a chain. The script on the right shows the process of how to make this to happen.

Spinning Around

Sphere mover.png

This video shows how ten spheres as one are spinning around a little bit further from the 'zero' spot of the axis as the action is happening in three 3D space. The script on the right explains the step by step programming for this action to occur, using 'sin' and 'cos' rules to make a circular movement. 

Spinning Around In Further Distance

Sphere mover1.png

This video shows the spinning of ten spheres around the 'zero' spot on the axis as it was described in the video above, but this time ten sphere as one are spinning more further away from the 'zero' spot in the axis. The script on the right explains that this was done by adding the code for the radius to achieve the planned effect. 

The Spinning Of The Line In A Clockwise Direction 

Sphere mover2.png

This video demonstrates how ten spheres linked together appearing as a line are spinning around the 'zero' spot on the axis in a clockwise direction. The script on the right explains what was done for this action to happen, when the 'radius=transform.position.x' code was used. 

Spiral Spinning

Sphere mover3.png

This video demonstrates the spinning of ten spheres as a line around the 'zero' spot on the axis and the line is spinning as a spiral. The script on the right describes this process as this time 'speed' was added in the code.  

The Abstract Spin Of A Larger Number Of Spheres 

Sphere mover4.png

In this video, the spinning of 100 spheres is seen. The larger amount of spheres is spinning around the 'zero' spot on the axis in hypnotic motion. The script on the right describes the way how it was achieved which is the same as it was described above. The only difference is the number of spheres. 

New Physic Material & Collider

Gravity And Collider

This video demonstrates how the sphere is falling down with the use of gravity and it lands on the cuboid. The image on the right shows how the collider works. When the gravity was added inside the sphere, it made the object fall down. For the cuboid, the access of gravity was frozen and it allowed the cuboid to remain still. 

collider.png
collider1.png

The Action Of Bounce 

collider1.5.png

This video describes the falling and landing of the sphere. This time, when the object lands it doesn't remain still, it bounces back until it stops. On the right image there is an explanation of this action to hapen. The bounce is achieved by increasing the mass of the cuboid. 

Experiment/Challenge Task

1.png

In this video, the spawn of spheres is shown. The spheres with the use of gravity are falling down. When a collider is added it makes the spheres touch the cuboid when they reach it and bounce back. When the cuboid is hit by spheres it spins on the 'y' axis as the other axes of 3D space were frozen. The script on the right demonstrates how the appearance of spheres is done, following the curtain code. 

The spawning of spheres

Spere.png

In this video you can see how by certain coding the spheres are spawning in a vertical direction, bouncing one on top of another constantly until the 'stop' button is clicked.

Gravity and force rules

Spere.png

This video shows how spheres are spawning constantly without any limitation and falling down following the gravity rule. Once they touch/hit the rectangular base, it rotates by the hit force of the spheres. 

Spawning limit spheres

limit.png

This video demonstrates the same process as was described above. The difference is that this time the limit number was added to the code. This time the spheres are spawning following one another up to ten. When it reaches the amount of ten, no more spheres will be spawning. 

Location To Be Destroyed

de.png

In this video is seen how the spheres are spawning and moving down fallowing the gravity rule. Once they reach the coded location which is (-5) on Y axis, it destroys itself as the certain command was chosen. 

Hit and random colour change

colour.png

This video focus on changing colour randomly. The spheres are spawning, then falling down followng the gravity rule and once they have contact with an object by hit, they randomly change colour. The rectangular base also changes colour when it is contacted by hit with an object. 

tils.png
tils1.png

Tiles Grid

In this image is seen how the square shape base consisting of small tiles is spawning as 10x10 code was set for the tiles to appear on the X and Z axes. The script on the right describes this process in detail.  

Destroy Tiles By Repeatedly Bouncing A Ball Off

whenhit.png

This video demonstrates how the unlimited amount of spheres are spawning and moving down along the rectangular base towards the tiles grid, following the gravity rule. It was coded that when a sphere hits the tile in bouncing motion, a tile turns red. When the same tile is hit again, it will turn black. Finally, when the same tile is hit third time, it destroys itself. Bassically, it is similar to 'breakout' game, where a bricks disappear when they are hit by a ball. The script on the right shows in detail how the process was made.

Tiles Changing Green And Rotating

green tils.png

This video reflects my coding on the right for the tiles on the base to change green and start rotating randomly when they have been hit by spawning spheres. When the tiles are hit by spheres three times they will destroy themselves as it was described above. 

Blue Cube Navigates The Location For The Spheres To Spawn

This time, I created the code for a blue cube to choose a location for the spheres to spawn, when it moves freely, is controlled by the player and spawns repeatedly not just in the middle like it was in previous versions. For this action to happen, I used horizontal and vertical direction options of the arrow buttons on the keyboard which can be used by a player as it is shown in the video. 

cus.png
cus2.png

Movement

Horizontal And Vertical Movement. 

This video demonstrates the use of horizontal and vertical movement and shoot. The script on the right describes in detail how it was achieved. The process of turning in horizontal and movement in vertical direction has been already added in the code and notified which key it represents. For example as it seen in the code, horizontal tturning is a right arrow key button or 'D' as alternative. For the vertical movemrnt (moving forward) is a top key button or 'W' as alternative. The process of shooting is explained in the image below. For example, when you click the 'space' button the object of a sphere appears coming out of the player and it destroys itself in five seconds as it was coded.   

Experiment And Challenging Task

This video is my experiment where I used the same process of actions as it was described above but in addition, I used 'AI'. It allowed the player to be chased by an enemy. I also used the collusion for bounces. 

Prototyping

The Mazzer Test Play

The video above showcases the gameplay of my prototype game.

 As is shown by the video, the game is set in a maze, within this setting the player - who is human - is simply designed to look like a red colour capsule with a trail in the same colour.

As the player, your mission is to navigate the maze, escaping from enemies to find a safe way out. As a big fan of puzzle games, I was particularly inspired while designing the game and enjoyed it even more when creating the maze. I felt confident in building up a structured setting, using simple shapes at first; experimenting with sizes and lengths. Of course, like many others when initially designing a game, I encountered such as bugs, glitches and other issues which obstructed the progress of my game.

One issue I had in my game was that I struggled to make the enemies go down a set path without getting stuck on an object: instead of passing freely, they were stuck in the corner of a pathway. Another difficulty I had faced, was linked to the spawning of the enemies: initially, the idea was that once the enemies are shot by the player, they should spawn again.; however, I faced difficulty in making this happen.

I had issues with the player spawning also, the lighting suddenly going darker when a player is killed instead of remaining the same as I had intended it to.

An important aspect of the game is shooting but similarly to other features there were problems: projectiles passed through the walls of the maze instead of being stopped and additionally the bullets would not follow the player's movement for example when hopping.

The Mazzer Scripts Code

The images above are the scripts that my game consist of. 

ThirdPersonMovement script:

 The "ThirdPersonMovement" script is for the movement of the player with smoother rotations - which makes the player's motions more realistic. The script also links the camera to the players, following it as it moves throughout the maze, placed to be in a third-person perspective slightly above the player. The script also accounts for the ability to shoot projectiles, this ability being accessed through the pressing on the 'Space' button on a keyboard, further, it links the W, A, S, D  or ←↑↓→ keys with the movement of the player; this allows the player to not only navigate the maze but also defeat the enemies in line with my aims. 

PlayerGun script:

The "PlayerGun" script summons a projectile that is fired from the player in the direction it is facing when 'Space' is pressed as intertwined with the 'ThirdPersonMovement' script. This script adds force to the projectile object to allow movement,

Projectile script:

The 'Projectile' scripts code for a "bullet" that is fired by the player as shown in the previous scripts: however, this script allows the enemies to be injured by the bullet, inevitably being destroyed.  Moreover, the script allows projectiles that are fired to be linked to a timer that determines its lifespan; being destroyed once the timer reaches, this allowed the game to be less laggy as there are fewer objects present at a given time. 

Enemy script:

The 'Enemy' scripts link an AI to the green capsule object that is the 'Enemy', allowing it to pursue the player, killing it if the two make contact with one another, this action restarting the game.

EnemyManager script:

The "EnemyManager" is a script that accounts for the spawning of enemies in the maze in various positions scattered throughout the set.  The script allows for the respawning of the 'Enemy' once killed by a projectile, spawning in a different position to which it was killed at. 

The Mazzer Objects

The images above showcase the assets I had created for my prototype game. To complete this I used the software Unity, as it allowed me to experiment with different shapes and sizes to create a simple layout of the setting but also the characters and objects within it. 

ThirdPerson

The 'ThirdPerson' is a red colour capsule shape character with a white antenna on the top furthermore having a rectangular protrusion as a representation for 'goggles' that are able to easily identify the character from the front. This asset is controlled by the player.

Enemy

The 'Enemy' asset as shown above is a green capsule that is slightly bigger than the 'ThirdPerson' asset (Player) without any defining features. The asset is controlled by an AI and its sole purpose to pursue and kill the player. 

Projectile

The 'Projectile' asset serves as a "bullet" type of item that is fired by the player. IT is controlled by the player, using the space button, and its purpose is to destroy enemies. 

Wall2 and wall

To create the maze, I created two different type of 'Wall' assets: one serving as a solid barrier whilst the other has a gap in it to allow the movement of the player through it. 

bottom of page