Monday, 28 November 2016

Game Development Week 4

In this weak I focused on creating the health bar and the obstacles.
First of all I researched for a black heart-it represent the main obstacle which the main character has to avoid it. I also find a puddle which adjusted it in photoshop and converted when in png ,being suitable for GameSalad.
The black heart and the puddle have the same attributes as the red heart ,only some of the attributes and rules needed to be modified.Therefore I copied the red heart.Then I changed the name, the image and then modified the attributes. For the black heart I have created a new score which is linked to the health bar.So,when the boy collides with a black heart,the health bar is getting smaller.For health bar I created an integer game attribute which help me to create the rule when the boy collides 5 times with black heart is chancing to the scene :Game over. The game is over when the boy collides with the puddle.The boy does not need to touch the puddle because he loses the game as well.
The black heart and the puddles was not difficult to create them because their attributes are similar to the red hearts.I just doubled the actor'' red heart'' and then changed some attributes and in the case of black heart I created an attribute that is linked to the health bar- so when the boy collides 5 times with the black heart,the game is over and it is changing to the next scene, named ''Game Over''.

Below are attached the rules that I have created for the health bar:


Below I attached an image of the scene Game Over and how does it looks.

I used different effects from photoshop to create a dramatic effect. For creating the buttons ''try again'' and the displayed text '' Game Over'' I used a website where I chose the design and then put them in the game as actors.

The video below shows how well does the health bar works and also how the boy interacts within the obstacles:the puddle and the black heart.







Now, I am confident in creating the health bar and also in creating new obstacles. I realised that the health bar is a very important element of a game. The actor and the actual game is playing around it.
Very important elements of a game represent the obstacles. Basically if your created content does not include obstacles-you can not say that it is a game.
Creating obstacles and make the main character interacts with them is a big step in developing a game.

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.

Monday, 14 November 2016

Game development Week 2

In my second week of making the game I have made my main character jumping.
First of all I added the gravitation in the game and followed the sonic game and how I made sonic jump.I applied the same rules for my boy character.In that moment I met a problem,I was not happy how the character is jumping and ask for teacher how I could do it better.He explained that I have to do different from sonic.In sonic I used the change attribute rule while in my own game I created a new attribute-jumping and created a rule which says that then the up keyboard is down it will change attribute linear velocity y to 850 and in the same time it will constrain an attribute self.jumping to true otherwise the change attribute self.jumping is false. And also for jump rule I have made a new rule which changes the image when the character jumps.
I think that now the character is jumping very well.
I attached below he coding that I used for my main character when jumps:


The second thing that I made in game was creating the 'hearts' that the boy will collect.I researched an animated red heart, converted in png and applied in the game. At this point I have created a new rule -the score.That will display text in terms of how many hearts the boy is collecting.
For the heart I created a new attribute that counts and also when the boy collides with the heart ,it is  is destroyed. The hearts appear in the scene randomly.I am pleased with the way I have created the hearts .

I did not find any difficulties when creating the coding for the score and the actor''red heart':

1.My first rule consist of the actually animation that is going to be displayed in the scene.
2.The second rule represents the movement of the heart and its role in the game.For this rule I used the y and x position.
3.I used the spawn behavior, the actor is spawning randomly-for that I applied the timer.
4.Next rule represents interacting with the main character.It is playing a sound and it is destroyed when is colliding with ''boy''.
5.The last rule consists of the score. The counter is working and is counting the number of hearts that the boy is collecting.So, when the score is 10=the scene is changing to the next one.




Bellow is attached a video of how the boy is collecting the hearts and how well does the score works:





Now, I am confident in trying different rules,For example how I tried with the jump rule. I know that one rule can be made in different ways. I also improved my Photoshop Skills-I designed the animated red heart in it and also converted it in png.

For my next weak I am planning to create platforms and different obstacles.