For today’s lesson I had to go over a topic that I did in GCSE maths. It was trigonometry. One of the most IMPORTANT things to remember about trigonometry is SOHCAHTOA.
SOH = Sine= Opposite/Hypoteneuse
CAH = Cos= Adjacent/Hypoteneuse
TOA = Tan= Opposite/Adjacent.
Trigonometry is useful in 2D games. It helps a lot with movement of an object.
To move left and right you use: X=Cos(Angle)*Distance
To move up and down you use: Y=Sine(Angle)*Distance.
I also learned about radians, which can be used as an alternative to degrees. 360° = 2 pi (No pi symbol).
To convert radians to degrees or vice-versa you do:
– Radians=Degrees/180*pi
-Degrees=Radians/pi*180.
A class diagram is basically a blueprint for what an asset is going to do in a game.
In the first box of a class diagram is the CLASS NAME.
In the second box is a list of VARIABLES
In the final box is FUNCTIONS, THEIR PARAMETERS and DATA TYPE.
I am currently deciding on a final idea for my solo game