Welcome to my APCSP final coded with my friend @skibidi0r0d! - About - This is a a game where you use a number of mirrors to reflect a laser to hit a target. You get 1 try to hit the target (Green line) and 90 seconds to do it. This idea is based off of a Science Olympiad event called optics. - Reflecting - The lighter colored side of the mirror are the "glass" when the laser hits it, it will reflect. The law of reflection states that the angle at which the laser hits the mirror is equal to the angle at which the laser is reflected off of the mirror. - Mirrors - There are two types of mirrors: - Barrier Mirror [Red]: This mirror is worth a lot of points but you can not control or move it. It will always be positioned at (0,0) and the direction will always be random. - Other Mirrors [Blue]: These mirrors are worth less but help you hit the target. Drag them to change their position and use the arrow keys to rotate them. - Controls - - Right + left arrow keys: Change the direction at which the mirrors are facing. - Space: Use space to turn the mirrors by a single degree and to snap to grid when dragging. - Mouse Pointer: Use your mouse to drag the blue mirrors around. - Laser Pointer: Click the laser pointer (labeled "press here") to shoot the laser. - Scoring - The scoring is as followed round(((MS-AS)/30)*DS) it is out of 100 points and determined by 4 factors: - Barrier Mirror: Use = changes mirror score (MS) by 10 - Other Mirrors: Use = 10, 15, 18, 20 points added to your MS (depends on amount - Accuracy: Your accuracy score AS is your distance x + y from the target divided by 200 and then subtracted from 1 and used as a multiplier to your mirror score - Length Traveled: Your distance score (DS) distance traveled is divided by 100 and then is floored an divided by 6. Your DS is used as a multiplier to your total score.
- Hitting the side of a mirror will cause it to reflect weirdly. - Sometimes laser may reflect off of the back of the mirror - Still working on this project and may add features - Coded with my friend and credits to them for helping out - Songs by Laufey downloaded from the internet archive