Friday, November 7, 2014

Fly polygon and frog jump fixed. Screen resolution fulfix.

Fixed the bug that caused the hit detection to not work. The problem was with the creation of the polygon. I made the polygon do a full loop i.e. it started at position 0, -50 and ended at 0, -50. This made our polygon collision detection not work. Spent better part of the day pulling my hair out, trying to figure this out. Since it worked for the polygon detection between the frog and the fish, I knew that the method was correct. At last, I looked for differences when we create the polygons and spotted this difference. Now it works correctly.

I also changed the frog jump calculations, removed the invisible ceiling that the frog always hit and changed the max time you can charge your jump. These changes are not final and requires fine tuning.

Lastly, I messed about and added a "fulfix" to fix our resolution problems. We now check the aspect ratio of the screen and change the gameWidth calculation based on which aspect ratio the screen has.