First Playable

 First Playable

I had a little bit of a set back this week while continuing on with my game. After creating my first playable I had set my unity app to update. After said update I tried opening back up my project which constantly failed to open into safe mode or not at all. I decided to start again but to make another form of 2d game. One that i would be able to finish on time. 

I decided to create an endless scroller game like the chrome dinosaur game or more along the lines of flappy bird. I found my assets online and brought them into to photoshop to recolour them. I decided to go with a more darker colour than the original with a lot more purples and blacks.







 Once I had my assets in the unity project I began by adding a player controller to the bird. This allowed for the bird to move along the x axis after each press of the space bar. I also added gravity to the bird so he would constantly fall if the player did not press the space bar. I also wanted to add some sort of animation to the bird so I added a script which would have the bird play through three images so it would appear they were flapping their wings and here is my player controller script.


I also needed to make it appear as if the ground and background was moving I had the background set to duplicate and the also the ground they both used the same script but set to different speed values. And here is the code for that.


The last thing that I worked on was the pipes I needed to have them constantly spawn in at different positions along the x axis. Kinda like what I did for the obstacles for my 3d game last semester. I brought to pipes in and made a game object of the 2 of them. Once I had the set at the position I wanted I set both of them as triggers so if the player hits off them its game over. I also added a trigger in between the space so if the player passes through them without hitting them they get a point I also needed to have it that once the pipes pass a certain point they are automatically removed from the scene. 


That is how far Ive gotten so far. I still need to add the actual triggers for if the player hits of the pipes and goes to a game over, a score counter for the player and possibly some sound effects/music for the game. 

 




Comments

Popular Posts