Racket Shooter

    This program was created in Racket just like my paint program. I wouldn't call it a complete game but it contains a sufficient amount of functionality. You take control of a black triangle which you can move with WASD. The triangle rotates to face your cursor, which has a red crosshair. Clicking with the mouse shoots a red bullet which matches the triangle's rotation. There's a rotating square that moves across the screen, representing an enemy. When a bullet hits it, it expands until it "pops" and then shrinks down to a different size and color. The HP of the player and enemy is displayed at the bottom of the screen.

Below is a screenshot of a program I wrote to figure out the math. 'p' is player, 'm' is mouse, and 'k' is a point calculated using the rotation of the triangle. If I remember correctly, the number under 'm' refers to the rotation of the triangle.

Download