Author Topic: How much math is actually used when making an avoidance?  (Read 2280 times)

PiranhaTooth

  • Wannabe
  • Posts: 38
  • I'm a totally mediocre fangame player...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 53.0.2785.143 Chrome 53.0.2785.143
    • View Profile
    • Steam Profile
  • Playstyle: Keyboard
How much math is actually used when making an avoidance?
« on: October 07, 2016, 07:45:50 PM »
Back a couple (or a few) years ago, i learnt basic trigonometry. I know the whole SOH CAH TOA nonsense and how it works in terms of triangles, but for some reason I'm having trouble converting that knowledge into GameMaker, and let alone how it makes circles and all that nonsense... So my broad, overlying question remains; When making an avoidance, how much knowledge around trigonometry (or math in general) do you really need? It's a hard hurdle for me to overcome, and I would just like to get a statement on generally what's needed before i delve into something I'm potentially not prepared for.

Thanks in advance,
~Piranha
Meme connoisseur of many Twitch chats...

Habluka

  • Wannabe
  • Posts: 23
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 53.0.2785.143 Chrome 53.0.2785.143
    • View Profile
  • Playstyle: Keyboard
Re: How much math is actually used when making an avoidance?
« Reply #1 on: October 07, 2016, 08:42:22 PM »
It really depends on what you're trying to do, but knowledge of basic trig is useful in making cute shapes and patterns.  Also, basic knowledge of calculus is helpful when it comes to tweaking values to be synchronized with the music.




Fancier stuff will require more advanced math and more involvement though.

tehjman1993

  • Global Moderator
  • The Kid
  • Posts: 278
  • Meme Enthusiast
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 53.0.2785.143 Chrome 53.0.2785.143
    • View Profile
  • Playstyle: Keyboard
Re: How much math is actually used when making an avoidance?
« Reply #2 on: October 07, 2016, 08:46:27 PM »
If you need help understanding any of the topics in math that you would actually use in an avoidance, just let me know - I'll hook you up with that fresh knowledge.

PiranhaTooth

  • Wannabe
  • Posts: 38
  • I'm a totally mediocre fangame player...
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 53.0.2785.143 Chrome 53.0.2785.143
    • View Profile
    • Steam Profile
  • Playstyle: Keyboard
Re: How much math is actually used when making an avoidance?
« Reply #3 on: October 07, 2016, 09:11:49 PM »
It really depends on what you're trying to do, but knowledge of basic trig is useful in making cute shapes and patterns.  Also, basic knowledge of calculus is helpful when it comes to tweaking values to be synchronized with the music.

Fancier stuff will require more advanced math and more involvement though.

Hahah, those are some intimidating screenshots... I've spent the last little while trying to learn about lengthdir, and i can see sort of how it can be used to make things like circles, so that's a start i guess :P I opted for Statistics over Calculus earlier this year, which in hindsight probably wasn't the best decision, but I'm hoping to switch to Calculus for my last year of high school next year, which should help me understand some of the terminology behind a few things such as vector and whatnot. But it's good to hear that from a reputable avoidance maker, thanks!

If you need help understanding any of the topics in math that you would actually use in an avoidance, just let me know - I'll hook you up with that fresh knowledge.

That's great to hear! It's always awesome when people in the community are willing to help out a newbie with this sort of stuff. I'll keep that in the back of my mind as a sort of 'last resort' if you will. I really do dislike personally calling on people since there's likely a lot more important stuff they could be doing with their time. But hey, you offered, and I'll sure hell call on ya if I need ya. Thanks again! :)
Meme connoisseur of many Twitch chats...

L4Vo5

  • Cherry Eater
  • Posts: 59
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 53.0.2785.143 Chrome 53.0.2785.143
    • View Profile
  • Playstyle: Keyboard
Re: How much math is actually used when making an avoidance?
« Reply #4 on: October 08, 2016, 01:09:41 AM »
Wait, calculus? when do you use calculus?
I have to admit, i still haven't beaten IWBTG

Habluka

  • Wannabe
  • Posts: 23
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 53.0.2785.143 Chrome 53.0.2785.143
    • View Profile
  • Playstyle: Keyboard
Re: How much math is actually used when making an avoidance?
« Reply #5 on: October 08, 2016, 02:44:29 AM »
Wait, calculus? when do you use calculus?

When deciding on what to make the individual constants to synchronize certain kinds of attacks and patterns with audio cues or planning out how to make certain objects move in certain ways.  It's very basic and not exactly necessary, but it helps get rid of a lot of trial and error.

klazen108

  • Administrator
  • The Kid
  • Posts: 286
  • your a kid now your a squid now
  • OS:
  • Windows 10 Windows 10
  • Browser:
  • Chrome 54.0.2840.71 Chrome 54.0.2840.71
    • View Profile
    • Delicious-Fruit
  • Playstyle: Keyboard
Re: How much math is actually used when making an avoidance?
« Reply #6 on: November 04, 2016, 01:26:52 AM »
As an example of how calculus is useful in game design, imagine you have an object you want to move into a position. However, instead of just moving at a constant speed and snapping into place, you want it to start out fast and kinda "slide" into place at the end, smoothly.

To start out, you might want to plot its position as a function of time, and a semi parabola works perfectly for us. In addition, you know that its speed will start out at some value, and decrease to zero at the final point. Understanding that velocity is the derivative of position (stick with me), you can link these two functions together and with some set conditions like distance and desired time to complete, you can calculate the initial speed and acceleration you should give your object to reach the target with your desired movement. To apply this in gamemaker, you would calculate the initial speed and gravity using the above method, and then set an alarm to stop it after the number of ticks you want, and the math handles the rest! (And did I mention it looks real neat!)

This is what you learn in the 100-level math course "Calculus I with Analytic Geometry", which is the study of functions and how you can shape them to have desired properties. Very neat stuff, and incredibly helpful when dealing with physics calculations.

Additionaly, if you're interested in learning more about math and how it applies to game design, TJ's doing some on-stream math lessons! Here's his first one, Distances, Triangles, and Trig: For Game Makers!