Pretty much, I never knew how little I actually knew in applying the concepts.
So, I'm currently reading the XNA Game Studio Express book and on the first lesson, it is having me program an example program of having a tile of smileys (a texture), scroll at 50 pixels per second. The background of tiled smileys will oscillate up and down, varying its vertical position between 200 px up and 200 px down in a cycle that repeats roughly every 11 seconds, which is 33 degrees per second (something I would like to have explained mathematically why this relates to time). The vertical offset is calculated using the sine trigonometric function, which takes an angle in radians and returns a value between -1 and +1.
I'm not trying to understand how to do this code-wise since the book gives it out, but trying to understand why and how this works mathematically. Here's the code that the book gives:
protected Vector2 m_BkgrTileOffset = Vector2.Zero;protected const float BkgrDegreesPerSec = 33.0f;protected void DrawBackgroundTiles(SpriteBatch batch){ double degrees = BkgrDegreesPerSec * m_TotalSeconds; double radians = MathHelper.ToRadians((float)degrees); m_BkgrTileOffset.X += -50.0f * (float)m_ElapsedSeconds; m_BkgrTileOffset.Y = (float)(200 * Math.Sin(radians));}