Wednesday, November 2, 2011

Scratch: Keeping Score

The Keeping Score technique is great with making a game because it allows you to keep scores on your game depending on what you decide your game is about. An example includes the game Pacman where you get points every time pacman eats something.

What I wanted to do was score 1 point everytime the warrior's sword touches one of the shadows, in other words the bad guy in my trial game. In order to do that I had to first create a the score box which shows you your current score.

To control how you get the a point and when you get the point I had to line up the following blocks...


In doing this, I have made it so that the actual gameplay begins when the z key is pressed. This sets the score the 0 and changed the warrior costume to 'charge' which is it's attacking stance. It also shows that when the warrior sprite is touching the shadow sprite, the score will change by 1 adding to your score.



Scratch: Changing Costumes

First I use an original image of the sprite and duplicate it many times according to how many different costumes i plan to create. The original image of the sprite being this simple cartoon warrior.


By clicking the copy button, you will duplicate the given sprite. I copied this sprite so I had four of the same image. To change the different costumes you click the edit button and a small paint-like application will pop up so you can manually edit your sprite costume.


What makes this difficult is the process of manually editing the costumes. Before creating more costumes however you should take care to edit the original so that the background is transparent, making it easier for you to customize your other costumes.


I finished by making four different costumes where the warrior is taunting, speaking with heroics, withdrawing his sword and drawing out his sword. The different stances that the warrior took were manually done, using the paintbrush, the paint picker tool, the filler tool and the eraser.