Lost Penguin is a game about a penguin that is lost and needs to return to the North Pole. This game was the hardest thing I have ever coded. Because of the intricate workings of the game, I had to make sure that everything worked properly. The game has two obstacles, pipes and birds. Birds do not harm you, however they blind you and make you unable to see your characters position. The pipes act as walls. If you hit one, its game over. This code above show the startup and the jump commands. "Broadcast message1" gives the ok for the other Sprites to start the commands entered in them. The two "glide: commands make the jumping motion. The pipes were a fairly easy challenge. i just made an object clone itself and then move left as it was a clone. I also made it so if the pipes touched the penguin the game would end. finally was the bird. it was the hardest for one reason only. i have no clue why it acts the way it does. the code is correct, and the bird just does its own thing. It works great though.
0 Comments
In the binary bulbs activity, our goal was to make a guessing game that used binary to give the numbers. The coding on this project was fairly easy. First, I had to make the actual random number appear to show what number you had to reach. To do this, I used a variable and set it to a random number between 0 and 255. Next, I had to allow the light bulbs to be clicked and let it change the "Guess" variable. This was the hardest part of the code because I had to do each bulb independently. Each bulb was meant to represent a different value, so each bulb could not just be duplicated and moved. This took most of the time I spent on this project, and how I solved this will be shown below. This continued all the way to 128.
The final thing I had to do for this project was add the "Guess" button. This was just a quick code input with a couple sound files telling the user that the guess button was clicked, and a clapping sound follows if the guess was correct. The code is shown below. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |