Today in class we discussed Trigonometry & Class Diagrams and how they are applied within games design.

I say we discussed, the class discussed and for the most part I sat there and listened, pretending I knew what they were going on about when in fact, I had no idea. I know I really struggle to understand coding and I couldn’t so maths if my life depended on it in school – and that hasn’t changed since.

But I still have to show what I’ve learned (and I use that term loosely) and done in class anyway, so here goes nothing.

 

A good chunk of the lesson today was made up of going over the research we’d done and discussing it in class in a bit more depth. Here’s what I ‘got’:

 

Trigonometry

Trigonometry is split up into three parts: sin, cos & tan and these angles are used to calculate movement and positioning of  game objects.

  • SOH = opposite/hypotenuse
  • CAH = adjacent/hypotenuse
  • TOA = opposite/adjacent
  • or SOHCAHTOA for short

The SOH & CAH are the angles which are calculated for movement in 2D space.

 

Radians

These are an alternative to degrees and are commonly used in code. 1 radian is the angle wrapping a radius around its own circumference. Or like this GIF accurately explains it;

circle_radians

“The GIF that keeps on giffing” – Ant Cain, Sunderland College

 

Pi (π) radians is 180 degrees so 2 Pi (π) radians is a full rotation, as the GIF above explains. Converting degrees to radian and back again;

 

Class Diagrams

A class diagram is like a recipe or a blueprint. C# files I’ve made in my Unity projects are class files. They’re the blueprints for the custom components added to your game objects – transform, rigid body etc. They also explain the actions (functions) an object of that type can perform.

capture6

Top cell is class type that already exists in Unity, so in the example above its the Transform class.

The 2nd cell is used to list all of the properties, stats or variables associated with this type of object and the 3rd cell contains a list of all the actions (functions) a class contains.

That, in a nutshell was what this mornings learning was about. And I have little idea what it actually meant. I can see that Trigonometry is a big part of behind the scenes work in 2D games but this brain of mine is unable to effectively understand coding in Unity and maths to know what exactly was being said to me or for me to take this information further. Blinder.

Next weeks research is: Array’s & Lists from programming and Pythagoras’ theorem & Vector Normalisation from maths.

joy-meme

 

I think I’ll be a designer instead – I think I can do that. I’ll be the English Miyamoto!

Speaking of designing; I’ve decided that this game I’m going to produce is going to have a 2D sprite/pixel art style. I’m looking at retro games from the NES, SNES and Mega Drive to see how they’ve made both their character art and backgrounds and I aim to try my hand at it.

I’ve never made anything like this before (there’s loads of firsts for me this course) so I’m not sure how well (or bad) they’ll turn out, but if its bad then I can only improve right? I just hope I haven’t bitten off too much for a first attempt and I can realise what I’m thinking.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s