User Tag List

Results 1 to 4 of 4

Thread: Trigonometry for gaming: where to start?

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Trigonometry for gaming: where to start?

    Hi!
    Browsing the forums, and during the development of games themselves, I'm realizing that a good knowledge of trigonometry is a great asset for creating professional games.

    I would like to study trigonometry, strictly related to the topic of game creation (no need to master information outside that). Is there a comprehensive online guide or resource to read, which you would like to suggest?
    I've already downloaded and read this from clickstore, http://clickstore.clickteam.com/math-and-loving-the-expression-editor, and it was very useful, but I would like to delve deeper into the matter.

    Thank you,
    Fabrizio

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    I don't know about good online resources (fully comprehensive and dedicated to gaming, at least),
    but basic rules (the ones you'll mostly need) of trigonometry are pretty simple,
    once you grasp the main meaning of trigonometry,
    that is (at least, to my understanding ): trigonometry is the math of "ratios".

    Direct functions (Cos, Tan..) will give you ratios from angles.
    Inverse functions (A-Cos, A-Tan..) will give you angles from ratios.

    I've posted this many times, so I beg pardon if anyone's annoyed by this image
    but I think "visualizing" really helps a lot in trigonometry:

    Trigonometric_functions.jpg

    This is, in short, what all "ratios" are about:
    all what you see in this picture are functions giving ratios related to the radius length.

    So if you have a point standing on the furthest edge of a radius measuring 10 pixels,
    and you rotate it by 45 degrees,
    its new position will be:

    (origin x) + 10 * cos(45)
    (origin y) + 10 * sin(45)

    That's what sin and cos does,
    and the same is true for other functions as well.

    I think a little "visualization" combined with this picture can already bring you to great results

    EDIT:
    strictly regarding gaming,
    the most important thing to notice is that Y coordinates are "inverted",
    because screen coordinates goes top to bottom,
    so all signs related to Y coordinates must be inverted
    (i.e. above: (origin y) - 10 * sin(45))

  3. #3
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleXNA Export Module
    ProdigyX's Avatar
    Join Date
    Jan 2011
    Posts
    1,197
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you need more visuals, you can search "Unit Circle" for more related topics. In trig, typically the angle of measurement will be in radians. In MMFusion, we use degrees instead of radians. As such, you will want to know how to convert between radians and degrees. I say, you should know which functions give you what. As mentioned above, Sin, Cos, Tan all give you ratios while Asin, Acos, and Atan, will give you an angle. I believe MMFusion automatically converts this to degrees, but make sure it is in degrees. Lastly, know what the different Atan functions in MMFusion do and the differences between them.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module

    Join Date
    Dec 2008
    Location
    Italy
    Posts
    404
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Thank you Schrodinger and ProdigyX for the useful advice!

Similar Threads

  1. Losing my Mind -or- How the last patch broke Trigonometry.
    By BossRighteous in forum Fusion 2.5
    Replies: 3
    Last Post: 25th July 2015, 11:15 PM
  2. Tutorial - Trigonometry In Gaming
    By Eliyahu in forum Articles
    Replies: 18
    Last Post: 12th September 2013, 08:18 PM
  3. Trigonometry Question
    By Jellyhead365 in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 28th October 2006, 09:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •