Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Chemistry Expert

A HTML game code for my website any help.

Video Game

Some web pages are written in a comibination of HTML and JavaScript. In this Application, you will create a video game using HTML and JavaScript. The idea of the game is that an image will move on screen randomly and the player will try to click the image as many times as possible before time runs out. The score will increase each time the player successfully clicks the image.

Perform the following steps:

1. Create a Web page called "game.html" and place it in the root directory. To that page, add a layer, which will be treated as an object, with an image for its contents. Add another image which will start the game when clicked on. When the game starts, the layer, including the image, will move randomly in any direction but not more than 10 pixels. The layer will not leave the visible screen space. You may assume an 800x600 resolution setting. Be creative when choosing your images, but avoid anything that may be considered explicit or offensive.

2. Add a timer, or loop, to determine how long the game will run. This should be set to 30 seconds. You will need to experiment to determine how many times a loop must repeat to make it last 30 seconds. One of the ways to accomplish this is by using the command "setTimeout()" which executes a code some time in the future. As an example, the following command will call the function "FlyLogoIE" exactly 50 milliseconds after this line is executed:

setTimeout("FlyLogoIE()",50);

3. The game should proceed as follows:

a. The score starts at 0. Each time the user clicks the image, one point is added to the score. This score is constantly displayed either on the status bar or somewhere in the background.

b. On every click, the layer also moves randomly, by not more than 10 pixels, to another part of the screen.

c. The game continues until the time runs out. Optionally, a dialog box appears telling the user his or her final score. The user now has the option to restart the game by clicking the "Start" image again.

4. For an extra challenge, implement levels of difficulty for the game. Add instructions that prompt the user for the level of difficulty at which he or she wants to play. A higher level of difficulty would correspond to either faster motion, a smaller target, or both. Perform this step only if all other requirements are met and you still have time before the due date. No extra points will be given to you for this step.

5. Add a link from your homepage to this web page.

6. Test the code thoroughly before publishing it.

7. Publish your work by uploading the new and modified files to your web host.

8. You can use the checklist to test the code thoroughly after it has been uploaded. It is highly unlikely that your game will work perfectly the first time. This step illustrates the need for code validation, especially on dynamic content.

Use this rubric to estimate your grade on the assignment. Submit a copy of the completed form with your assignment.

Zip your files, including the Word document, into a single file and submit it.

Chemistry, Academics

  • Category:- Chemistry
  • Reference No.:- M91240433
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Chemistry

A mixture containing 33 moles of no and 076 mole

A mixture containing 3.3 moles of NO and 0.76 mole ofCO 2  was allowed to react in a flask at a certaintemperature according to the equation. NO (g) + CO 2  (g) ↔ NO2 (g) + CO (g) At equilibrium 0.21 mole of CO 2  was pr ...

2 moles of a compound are allowed to react ina foam coffee

2 moles of a compound are allowed to react ina foam coffee cup that contains 197 grams of water. The reaction caused the temperature of the water to rise from 21 to24.7 degrees Celsius. What is the enthalpy of this react ...

A compound contains only carbon hydrogen and oxygen

A compound contains only carbon, hydrogen, and oxygen. Combustion of 10.68 mg of the compound yields 15.48 mg CO2 and 7.39 mg H2O. The molar mass of the compound is 182.2 g/mol. What are the empirical and molecular formu ...

Describe how to assign anbspoxidation number from

Describe how to assign a Oxidation number from the text: The oxidation number of an atom in an elemental substance is zero. The oxidation number of a monatomic ion is equal to the ion's charge. Oxidation numbers for comm ...

Assignment application planned change in a department or

Assignment: Application: Planned Change in a Department or Unit Health care organizations are continuously immersed in change from the emergence of new policies, to promote quality care and improve patient safety to keep ...

Upon decomposition one sample of magnesium fluoride

Upon decomposition, one sample of magnesium fluoride produced 2.55 kg of magnesium and 3.99kg of fluorine. A second sample produced 1.40 kg of magnesium. How much fluorine (in grams) did the second sample produce?

N2o5 decomposes following first order kinetics if 75 of the

N2O5 decomposes following first order kinetics. If 75% of the original sample of N2O5 has decomposed after 2240 minutes, what is the value of k, the rate constant, at this temperature(in min-1)?

1 if congress taxes co2 production at 40 per ton of co2

1) If Congress taxes CO2 production at $40 per ton of CO2, what is the tax to burn one ton (2000 pounds) of coal which is 75% carbon? 2) How much heat energy can you get from burning that ton of coal? Take the book value ...

In the spring time a background ozone level of 290 ppbv was

In the spring time, a background ozone level of 29.0 ppbv was measured in Edmonton. Convert the mixing ratio of 29.0 ppbv ozone to units of molecules cm-3. Assume a pressure of 1.108 atm and a temperature of 12.5 ºC.

A power plant converts the heat energy in coal to

A power plant converts the heat energy in coal to electricity with 35% efficiency. Transmission losses are 10%. A factory then uses that electricity to make hydrogen with 50% efficiency, which is used in a fuel cell to m ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As