So to that end I have looked to memory and found out some info for the game and this is where the maths stuff comes into it. As you can see from the pics there is a red triangle and a white triangle, you control the white triangle. You need to match size and angle to the red triangle to increase the points you get.
Size:
This is a piece of cake, float values increase and decrease.
Angle:
Ok this is easy enough in a way but to make it more efficient is a little tricky.
So being a triangle you can imagine 3 times in a 360 degree rotation it will be the same as the red triangle.
From my calculations you get 9 adjustments X 3 to make the 360 degrees.
Here is the float values.
Code: Select all
1.00 0.97 0.89 0.77 0.60 0.40 0.17 -0.06 -0.29
-0.50 -0.69 -0.84 -0.94 -0.99 -0.99 -0.94 -0.84 -0.69
-0.50 -0.29 -0.06 0.17 0.40 0.60 0.77 0.89 0.97
I have the red triangle value, example 0.77 and so to make the white triangle match I could just turn it to be 0.77 but it may have been posible to match triangles before turning that much, as example 0.17 and -0.94 are also a matching angle.
So would it be easier to just do a table of the angles or can I do some fancy maths stuff to do the same job, just incase the values aren't always exactly as recorded. I have noticed the float values kind of flicker when changing, so going from 0.60 to 0.77 it might flicker value at 0.76 before being 0.77
Or maybe I should use the byte values instead of float values?