Gaming Project

For the gaming project we learned what happens behind the scenes of a video game. We learned how to build a video game.

Pong

(Left: screenshot of the game, Middle: code of ball, Right: code of the paddles)The first project we had was to build a pong game. For this game we had to have about 3 sprites. One was the ball and the other two were the paddles. In order to make this work we had to make the paddle controlled by the user and make the ball interact with the paddles. In my code i couldn't figure out how to make the ball move in a 90 degree angle from where it hit the paddle. Also I'm not sure that the scoreboard works well.

Play the Game Below:

For the player on the left use the W ans S keys. For the player on the right use the up and down keys. To reset the scored and start the game all over again press the green flag.

Pointless Game

I created a game using BYOB. It is named the pointless game because you don't really win anything. I made characters that danced and I tried to make it play music. The codes for each thing are below

Play it here:

Here is the game. To start press the green flag. To move use the arrow keys. I need better graphics. The game was transferred from BYOB to Scratch and some of the code was altered to make it work the same.

Player

To write control yourself you only use the arrow keys and the keyboard if you need to input something. The location is automatically set to the origin at the start of the game.

Fairy

The fairy was one of the characters with the most code. She had conditional statements that told her what to do if something happened. When I was building the blocks I thought that she would get confused with the answer part since they aren't name differently but she knew which one was which because of the order.

Key

The key was told to wait for something to be true in order to appear. I used a variable called appearance that told the key when to appear. It only appeared if it equalled 1. The same thing was done with the stage.

Stage

The only thing different for the stage is that it would have a background change and it would play music but other than that it was set up similar to the key. When I transferred my BYOB project to online scratch, I was able to control the stage through the sprites instead of telling the stage how to do it.

Dancer

This is an example of one of the dancers present in the party. In order to get them to appear at the right time I had to make them only appear if the appearance variable was equal to 2. To get them to dance I made them have costume changes every half second and made than happen repeatedly. I also built the code would ask if they wanted to continue thus changing to different levels of a game. I ended up only having one dancer.

The Moving Flower

The moving flower was programmed similarly to the pong ball because I wanted it to move randomly so that the user would catch it. When it was caught it would change to a new stage or background.

The Unicorn or Knight

The unicorn and knight a programmed the same. They serve a role of a guide inside the castle. They tell the user what to do to get through the different quests and finally fulfil their journey.

The Ballerina

The ballerina is one of the characters that appears in the quests. She doesn't really do anything just appear and disappear when told to do so.

Back to Home Server Project Circuit Project Programming Robotics Artificial Intelligence