This is My Scratch Gaming project

Scratch

Scratch is a computer program that can be used to design and program games.It was made by MIT.

It uses an interface like the one shown above. The characters are shown on the white screen on the

right of the scratch interface. You can move, change the look or do anything else to the character or sprite on the interface.

To program the sprite you must drag blocks from the left of the interface. These blocks do several

different things. I explain the uses of these blocks below.

Operaters

Control

These blocks are used to control sprites (characters) or other objects on the screen. These blocks also

tell the sprite to do certain things when some command is received.

Motion

These blocks control tell characters or sprites to move. Also they can be programmed to turn. Another

thing the motion blocks do is to set the sprite on certain X and Y axis. Scratch is set up to have X and Y

axis like the ones you see on the graph.

Looks

The looks blocks program sprites or backgrounds to change costumes, color and size. They also program

program sprites to have text bubbles over there head. The same can be said with thinking bubbles.

Sounds

The sound blocks are used to play sounds, increase the tempo of the sounds, and increase the volume.

They can also be used to decrease the volume.

The operator blocks can be used to pick a number at random. Also they can merge variables.

Sensing

These blocks are used to “sense” other things. For example, they can be used to say if the laser touches

in the sprite make that sprite disappear.

Variables

These blocks create variables that can be used to make the score counter and other things like health

counters. They do this by storing a value to make the counters like score.



Scratch vs. C Programing

Scratch

  • block shapes to simplified programming
  • organized with the blocks
  • no compiling error messages

C Programing

  • Uses typed code for programing
  • Uses a combination of brackets, indentation, and semi-colons to organize code
  • Have to compile, which may have compiling errors

Development

When created this game I had no idea how to make a zombie in scratch. So I looked at the code of

another game and looked at the code for it. This game was called Zombie Fight 2(picture shown above).

After I looked at the code I created “The Adventure of Bob”.

Sample Code

These are some parts of the code. This is where I talk about what do they really mean.

Mouse Control

Mouse control code is where the laser Bob shoots in the Adventure of Bob. First, the laser must follow in

the direction of Bob. To do this we put a command for the laser to follow Bob. Now we must have Bob

shoot the laser. To make Bob look like he shooting a laser, the code says to have the laser appear on the

stage for a second. This make the laser appear to shoot out of Bob’s gun.

Bob Code

The Bob code makes him spawn and sets counters for the score and health. To make him spawn at the

starting position, the code tells bob to start at a certain X and Y points on scratch’s imaginary board.

After that, we must set up the score counter. We do this by creating a variable to say when game starts

set score to zero. Now we must set up a health system. To this we write code that says when the lose is

broadcasted then have character die and disappear. Lose is broadcasted when the Zombie touches Bob.

Part of Zombie Code

This is one part the code for a zombie in The Adventure of Bob. In this part of the code I programed the

Zombie to spawn and go towards Bob. First I selected a location for Bob to spawn at. To do this I set the

x and y axis. Now I had to make him go towards Bob. To this I had to put the point towards block in the

repeating block so the zombie would go towards Bob. There was only one problem with this; the zombie

will only point towards bob and don’t move. So I had to have Bob move. I accomplished this by putting

the move steps block with the repeating block. This caused the zombie to move indefinitely. To make

the eventually stop I replaced the repeat block with the repeat until block and put two things that made

it say: go to Bob until the Zombie gets killed or Bob gets killed.

The Adventure of Bob

To start the game click on the green flag

The game is simple, kill as many zombies as you can.

The mouse is to aim and the space bar is to shoot

Please note that the game is still under construction.

Conclusion

Scratch is a great program that is very easy to use and is a good starting point for put who are beginner

programmers. It is so great that there is a huge community of people who work on make games and

movies in scratch.( http://scratch.mit.edu/) This website is the main place where all of these games are

shared, viewed and seen. That website is the place where you can download scratch for free and get

tutorials on how to use scratch. Even though scratch is a good program, it dose have its faults. To

improve scratch I think it needs the option to have programming be in c code instead of blocks. This is

problem because sometimes in scratch you have to program the code in a way that causes the code to

be inefficient to do one task. This is due to the fact that the code is in blocks; it limits what you can do to

program scratch. With C (since its written code) this wouldn’t be a problem. During this project, I had

challenges making the game The Adventure of Bob. One example of this is when I tried to have bunkers

that temporally kept the zombies back and were destructible. Unfortunately, I couldn’t figure out how

to accomplish this and failed. After this project, I found out the main two reasons why some videos

games are bad.

  1. They do not have interesting idea to keep the developer inspired to do more
  2. Not enough time
Back to Homepage Go to A.I.