Monday, 21 November 2016

Game Development Week 3


In this week I created the platforms.Here I found difficult what I planned to do.I wanted that when the boy is colliding with the platform, the background is making a pause.I asked teacher how I can do it and he explained that  I should Create a global attribute called pause background and make it a boolean then inside the bg actor, rule: attribute game.pausebg = true, move backwards speed needs to be 0, otherwise move backwards needs to be 50 .After that go to my main character actor and set a rule: when actor collides with platform, constrain attribute game.pausebg to true otherwise constrain attribute game.pausebg false.I followed and did how he said but then I realised that I want not just the background stopping when the boy is colliding with the platform but also the hearts,the platforms and also the following obstacles.

I have solved this problem,by trying different methods and thinking logically.Below are attached the rules that I used  for platforms when collides with the boy.
 I need this rule for my game it because my background is always scrolling and when the platform is colliding with the boy the background is scrolling and there are different problems.Now the background is making a pause when the boy collides with the platform. The boy also interact with the platform very well and I am happy with the way that I have done it.

Stopping the background when the main character collides with the platforms creates a nice effect when playing. It also show how the actor is interacting with the platform.

There are the coding that I used for stopping the background:


Below is attached of video of how the boy collides with the platforms and also how the background is making a pause when the boy collides with the platform.



In this weak I learned how to create new rules for example stopping the background when the main character collides with the platform.I realised that experimenting and combined different behaviors, but firstly thinking logically will help you to reach the suitable rule for your game.
The next step consists of  creating  the health bar and also the black hearts. I also want to create the puddles,so when the boy collides just one time with it,the game is over.

No comments:

Post a Comment