I made my first official game on Code.org's app lab during the winter break. The game was a trivia game. I first did an alpha version of my game to test and see the scope and goal of the game, as well as my skills as a coder. After I finished the alpha version, I built the final version. First I added the U.I. to my game from the design menu. I added images, text, screens, and buttons to make the game functional. Secondly, I typed in the starting comments to explain the game. Thirdly, I dragged in onEvent code from the toolbox. I set the ID to the start button and set the type to click. Inside the onEvent, I dragged in playSound for the soundtrack of the game and setScreen to change the screen to the tutorial. I realized that the soundtrack wouldn't stop if you click the start button multiple times, so I tried to have a button to stop the sound with another onEvent with stopSound code inside that stops the soundtrack. I put stopSound code inside the first onEvent and surrounded the onEvents with timedLoops code. I even put onEvents with stopSound code to stop the soundtrack at various screens. Unfortunately there's potentially a bug that repeats the soundtrack once you press multiple times on the button and I couldn't fix it. The only solution I found was reloading. Anyhow, I flipped to the credits screen and inserted onEvent with ID as creditsButton and type as click. Inside the onEvent, I dragged in setScreen to set the screen to the credits. Next I inserted another onEvent with the ID as backToTheTitleScreen and type as click. I dragged setScreen and set it to titleScreen to send the player back to the title screen whenever the play presses the button to go back to the title screen. I placed in an onEvent with the ID as backToTheTitleScreen2 and type as click. I dragged setScreen code and set it to the title screen. After that, I dragged another onEvent function to go to the credits again from the winning screen. Then I placed onEvents for the credits and to continue rolling through the credits at buttons. Next I placed onEvents for the credits to back out of the credits and into the title screen. Afterwords I coded the tutorial. I inserted onEvent functions with IDs of tutorialAnswer(a number) and type as button. I set the screen for 3 of the buttons to go to the next screen while one of them sets the screen to the game over screen. After that, I placed an onEvent function that hides the tutorial and allows the player to skip the tutorial. Afterwords, I coded for the selection screen of my game. I placed onEvent functions with various IDs that goes to individual screens and I set the type to click. The first subject I coded was ELA. I dragged onEvents with screen IDs to lv(number)(ELA)Answer(number), type as click, and sets the screen to the next level and or to game over. I did the same thing but with the subject switched for the rest of the subjects except Memes. The subjects that had the same things as ELA were Math, Spanish, Science, Social Studies, Extracurricular activities, and Physical Education/Health. So for the Memes subject, I first coded the user agreement screen to disclaim the player. I placed onEvent functions with the IDs as contract button and iDeclineButton. I set the type to click to make the buttons clickable. Inside the onEvent functions I placed stopSound to try to stop the soundtrack and setScreens which sets the screen to either the next level or back to the selection screen. For the levels of Memes, I placed onEvent functions. I set the IDs for the onEvents as lv(number)(Memes)Answer(number) and set the type to click. I placed setScreens inside the onEvent functions that either go the next level or send the player to the game over screen. For level 5, I made the image clickable which makes the player go to the game over screen to reference a meme. For level 7, I placed on event functions that IDs match to the Ugandian Knuckles images and whenever the mouse pointer is hovered over, it says "Do you da wae?". I also made one of the answers switch to the science subject when the button is clicked to troll people since the Memes subject isn't a serious but a more comedic subject. For the final round of Memes which is level 10, I made a catching mini game for the player to pass instead of answering questions. I first placed an onEvent function that has the ID of SuccessKidMeme and a type of mouseover. Inside it I dragged in setPosition code. I set the ID to SuccessKidMeme and dragged in randomNumbers for the x and y positions and the height and width to make the image go to random places on the screen at different sizes. Secondly, I dragged in another onEvent function that has the ID of SucessKidMeme again but this time has a type of click. I dragged in showElement with an ID of memesCaughtText1 to show the text that the meme was caught. I dragged in hideElement with and ID of SuccessKidMeme to hide the Success Kid Meme image. I dragged in another showElement with and ID of AnimeMeme. I placed in a second onEvent function inside the SuccessKidMeme onEvent function with the ID of AnimeMeme and a type of mouseover. I dragged in setPosition with the ID of AnimeMeme and dragged in randomNumbers to make the image go to random places at different sizes. Thirdly, I placed in another onEvent function that has the ID of AnimeMeme and type as click. A I dragged in showElement with an ID of memesCaughtText2 to show the text that the meme was caught. I dragged in hideElement with and ID of AnimeMeme to hide the Anime Meme image. I dragged in another showElement with and ID of BeeMeme. I placed in a second onEvent function inside the Anime onEvent function with the ID of BeeMeme and a type of mouseover. I dragged in setPosition with the ID of BeeMeme and dragged in randomNumbers to make the image go to random places at different sizes. Next I dragged an onEvent function with a ID of BeeMeme and a type of click. I coded showElement with an ID of memesCaughtText3 and setScreen with an ID of winning screen to make the player win the game. Finally, I added sound effects and comments to my game and code to make the user experience better. It is important for web designers to know how to make a game in case they are assigned to make a website with games in it.
My game: https://studio.code.org/projects/applab/O97fRL8aylP53rf3xjQWggTqcV-Cy1HlXre1ZRCfmB4
No comments:
Post a Comment