Contents

Math Battle

Description

A game where you need to write math functions to guide your missile. A player wins when their math function intersects the other players circle. The asteriods were originally supposed to be destructable, but I did not finish it. Instead, the red circles are supposed to represent the missing regions of the asteroids. So the missiles should ignore the red circle regions allowing enough hits to bore through an asteroid. I think there’s a bug somewhere in the collision detection or rendering, because it seems to take a few hits for some of the circles to register.

Functions

Variables: x

Operators: + - * / ^

Constants: pi

Example equation: sin(x*2)+x

Functions available:

  • sin
  • cos
  • tan
  • sqrt
  • floor
  • sign
  • log10
  • abs
  • ln
  • exp
  • hypot
  • max
  • min
  • mod