Sunday 24 March 2013

More Pac-man


I have added a cherry to the game. It appears randomly and gives the player 300 points. In the code above, when the beginning song ends, It sets a variable called cherry to a number between 1-15, waits 5 seconds, then repeats. The code to the left hides the cherry and says that if the variable cherry is equal to 5, the cherry must appear. This means every 5 seconds there is a 1 in 15 chance of the cherry appearing. It just repeats this code checking every time.

This code gives Pac-man his score. It checks if is touching egg (the secret Easter egg :D) and then checks if Pac-man's yellow is touching the cherry red. If  it is, the variable score gets 300 more points. I still have to make it so that the cherry hides itself so that there isn't endless points to be taken.
I also moved some ghost movement points to prevent glitches.


Sunday 17 March 2013

Pac-man code - update

This is an image with some of the stages coding. I got the images of the web. As Pac-man dies, The code switch to background Pac-man back. This background is slightly different as it has grey instead of black.
This piece of code makes Pac-man move when he touches a black background, as it checks the background, moves, checks the background etc. This corresponds with the previous code to make it so that Pac-man stops moving and has a death animation, as when the background turns slightly grey, Pac-man isn't touching black. This means he stops moving.
I added this to the ghost:
and
The above code checks if the ghost is touching some invisible markers. If it is touching LR1, it chooses 3 or 4. 3 makes it turn left and 4 right. It does this because it checks the variables using the script to the left, and turns in the corresponding direction. It has another piece of code - similar to Pac-man's - that makes it move when touching black. The part above also has a junction, to it randomly chooses to move up, down, left or right, corresponding to variables telling it to.

Wednesday 6 March 2013

Pac-man project update 1!

Just an update from the previous screenshots



Also, cut down all of Pac-mans programming into 2 forever loops!
Screenshots to follow.

Pac-man scratch screenshots

This is Pac-mans programming (1/2). The loop on the right makes Pac-man go to the beginning  sets the amount of dots that must be eaten, plays music, says when the music stops, says where Pac-man should face, and makes walls solid. The wall x and wall y variables are set to wherever Pac-man is, and when he touches the wall it takes him backwards, so he cannot pass.
The part with 'stopmove' prevents Pac-man from moving when dead, and otherwise makes his mouth open and close.
The when touching color [dark blue] part makes it so when it touches a vulnerable ghost, it give points and tells the ghost to die.
The parts 'if dotcount = 0' makes it end when all dots are eaten.


Here is 2/2 for Pac-man. Where it has 'if touching PortalL/PortalR' it sets the teleport tunnel from the original.
The part with 'broadcast eat' makes it so that Pac-man can eat ghosts.
The long code to the left makes Pac-man eat himself upon death.


This code is for the dots. It makes them seen, gives points when touched, takes the dot count down by one, and goes invisible.


This is for the power dots. It also gives points and goes invisible, but it changes an on/off variable to get ghosts dark blue.


This is a sprite that displays the words GAME OVER as if it is being typed when you lose. It also displays WIN!!! when all dots are collected.


This is the red ghost program. It moves on a predefined path when the begin song finishes. It also turns to a normal ghost costume and goes to the beginning when the flag is clicked. It also sets some variables to off, and becomes eyes when eaten, and takes 10 seconds to go to the ghost nest.




Sorry for long post!

Sunday 3 March 2013

Pacman

Pac-man: an old arcade game. Outdated, right? Wrong. Pac-man may have been invented back in 1980, but it is still really popular today. It was originally invented by a man in Japan, and Pac-man's design was based off of a pizza with some slices missing and the game was originally called Puck-man. Later on, the game was taken to America where it was renamed 'Pac-man'.
The game play mechanics are simple, you control the pizza thing himself, Pac-man, while avoiding ghosts and trying to collect as many dots as possible. Power dots turn the ghosts dark blue and give Pac-man the ability to eat the ghosts which give points. The maze is always the same and as the player progresses ghosts get faster and tougher. There are meant to be endless levels but a glitch ruins the game at level  256:
The Infamous 'Kill screen'

A game released in America a few years after Pac-man was an unlicensed ripoff of Pac-man. This was called ms. Pac-man and had a version of Pac-man with a bow in her hair. The game was so popular that Atari bought the rights and licensed it.
A real life version of Pac-man named Pac-Manhattan was created using people in costume running around a designated area of Manhattan. The people have 'generals' guiding them, and the generals have a birds-eye view.
I personally think that Pac-man is still popular today as the addictive - yet simple- game play can just be played for hours. Many games nowadays over complicate the mechanics. Pac-man has had new versions but has always stuck to the age old formula. Nostalgia may also get people coming back for memories of their childhoods.
                                  /\
      The names of ghosts