Tuesday 23 May 2017

OO Design Assignment 2

For my game I have made quite a few assets for it using autodesk maya. These include weapons, buildings and props. Using these assets I made a world whilst reusing some of them to form a environment for the player to wounder round. These consist of building lamp posts and roads. As you can see below i have reused these assets to create a scene of a small town lit up by lamp posts. 


In my game there is basic player movement and weapon firing. The movement is just simple W,A,S,D  controls but the firing weapons is a left mouse click with simple ammo counter. This is done using blueprints.
 
Weapon blueprints for character: 


Character movement control blueprint:



The shooting blueprint works by using a "if" statement checking weather the variable for the guns mag is greater than 0 it will -1 from the magazine count and +1 on to used ammo variable if true then it will fire, if false it will display reload on the screen. The movement for the character works by pressing W,A,S,D to move around but is blueprinted using a movement input blueprint.

The weapon for the character has a reload function to refill the mag when empty as well. 

 
This works by checking if the ammo count in the magazine is equal to 8 if true it will display clip full, if false it will then see if the overall ammo count is greater than 0; if true it will then check if used ammo is greater than the overall ammo count. When false it will take away used ammo from the overall ammo count and refill the magazine to full and reset the used ammo to 0. 

Now for the code below it is programmed using game makers drag and drop coding from my killer clowns game made in game maker. The movement is a simple as pressing left and right arrow key to move in the direction u want to move by changing the horizontal speed. The space bar controls the gun it works by pressing to create the instance of the bullet. 

The difference between the two is the unreal 4 blueprints are more advanced than the drag and drop from game maker as blueprints have more functions. 

Character movement:


Character shooting:


In conclusion i think that the game maker drag and drop is easier than blueprints as it takes more of a simple direction to programming than blueprinting because blueprinting requires a better understanding to the game engines functions. With both you can come across annoying problems that can be fixed but it is down to you to find out how for example: with weapon reloading in unreal I could reload repeatedly even tho the mag was full but i over came that by adding the used ammo variable so it would calculate how many bullets you had used so it would only take away what you have used which corrected the problem.   

No comments:

Post a Comment