Episode 3 - I like Math

Episode 3 - I like Math

Released Friday, 16th December 2016
Good episode? Give it some love!
Episode 3 - I like Math

Episode 3 - I like Math

Episode 3 - I like Math

Episode 3 - I like Math

Friday, 16th December 2016
Good episode? Give it some love!
Rate Episode
List

subscribe on iTunes 

So the new game I want the baddies to take several patterns across the screen, one of them is a SIN wave. Ended up using Excel to remind me of Radians and work out a formula to input amplitude which I can use for y axis size.

image

Thumberjack math and rotation?

func isFingerTouchingLine()->Bool{....let minX = (xPos - (n.size.width / 2) ) - self.touchTolerancelet maxX = (xPos + (n.size.width / 2)) + self.touchTolerancelet minY = yPos - self.touchTolerancelet maxY = yPos + n.size.height + self.touchToleranceif n.zRotation == 0 {if self.tloc.x >= minX && self.tloc.x <= maxX && self.tloc.y >= minY && self.tloc.y <= maxY {retval = true}} else {let testpoint = self.rotate_point(realpos, angle: -n.zRotation, p: self.tloc)if testpoint.x >= minX && testpoint.x <= maxX && testpoint.y >= minY && testpoint.y <= maxY {retval = true}}....return retval}func rotate_point(_ c :CGPoint, angle :CGFloat, p: CGPoint)->CGPoint{let newx = cos(angle) * (p.x - c.x) - sin(angle) * (p.y - c.y) + c.xlet newy = sin(angle) * (p.x - c.x) + cos(angle) * (p.y - c.y) + c.ylet new = CGPoint (x: newx, y: newy)return new}image

ThumberJack Rotated Objects

Where did I lean to code on Apple

https://www.raywenderlich.com

Don't throw the baby out with the bathwater.

image

Shark Attack

 

Ironman Training 30 Weeks to go.

 

https://twitter.com/j0hnniemac

Music Licensed from : mobygratis.com - song: Rotator
Show More
Rate
List

Join Podchaser to...

  • Rate podcasts and episodes
  • Follow podcasts and creators
  • Create podcast and episode lists
  • & much more
Do you host or manage this podcast?
Claim and edit this page to your liking.
,