Skip to content

mcrlmrkt/309

Repository files navigation

{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf210 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;\red217\green11\blue0;} \margl1440\margr1440\vieww12600\viewh7800\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc \f0\b\fs26 \cf0 Mia Marukot & Muhsanah Mahaboob \b0 \ \b CDF IDs: c4maruko & c5mahabo\ \ \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural \b0 \cf0 \ul \ulc0 Design Documentation:\ulnone \ Level 1 and 2 have different ids, which is used to identify the levels and modify the high_score and game difficulty according to that. If the user starts without selecting a level, there is a popup which notifies them to pick one.\ Start button has a start id and on click function. When triggered, it clears the home page and load the game.\ Food are loaded first in the enter_foods function and their x and y position are store in the food_x and food_y array respectively. There are five foods which we have created, a burger, a donut, an apple, a cupcake and a banana.\ Then, the bugs are loaded every 1-3 seconds. The random time is generated in the load_bugs function and then, it calls the enter_bugs to display the bugs on the board. The bug array is created based on the probability that each bug has. A random bug is selected to enter the board. Then, we proceed to move the bug.\ A tap is handled by addEventListener. If it is a bug, we delete it, otherwise do nothing. A bug is identified using the RGB values, and given appropriate scores. \ When the game ends, there is a lose popup or a win pop us. It displays the game results, score, restart and exit button. The variables game_over and game_play keeps track of the status of the game, game over and pause, play respectively. \ If user clicks restart, it triggers the restart function. It resets the timer and score, clears the bugs and food previously loaded and update the high score. Then, starts a new game. \ If user click on exit, the page will refresh and high score would be updated. \ \ \ul Game Title:\ulnone Tap Tap Bug\ \ \ul Basics of the game and rules:\ulnone \ The game starts with 5 food on the table, and a timer starting at a minute. \ There will be bugs entering the screen front the top and going to the nearest food. If it reaches the food, it eats it, and goes to the next nearest one. The game ends when the timer is up, or when there are no food on the table. In the latter case, you lose. The goal of the game, is to kill the bugs before it reaches the food. Each bug has different killing score, bee being the lowest and ant being the highest.\ \ \ul Challenges:\ulnone \ One of the challenges we encountered was to move the bugs. \ \ \ul Core Features in Game:\ulnone \ \ \ul Data and algorithms used:\ulnone \ http://www.kirupa.com/html5/get_element_position_using_javascript.htm \cf2 Mia, if you use position function, do include this link.\cf0 \ \ \ul Test Plan: \ulnone \ We used the console messages to differentiate the output to the expected one. For example, see what food is the closest one from the bug.}

About

practice

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors