1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

OFFICIAL Physics In GameMaker Studio 2 - Part 1

Discussion in 'Announcements' started by rmanthorp, Aug 8, 2019.

  1. rmanthorp

    rmanthorp YoYo Games Staff Admin YYG Staff

    Joined:
    Apr 15, 2016
    Posts:
    309
    Hey! We're back again with another series of remastered GMS2 tech blogs.
    This 4 part series covers Physics! Check it out:

    https://www.yoyogames.com/blog/69/physics-in-gamemaker-studio-2-part-1
     
    Toque, RujiK and DBenji like this.
  2. curato

    curato Member

    Joined:
    Jun 30, 2016
    Posts:
    424
    I must say, Yoyo has definitely increased the quantity and quality of their blog entries lately.
     
  3. GMWolf

    GMWolf aka fel666

    Joined:
    Jun 21, 2016
    Posts:
    3,470
    Very good post.
    Is there a good way to get just the collision detection part of box2D in GM?
     
  4. DBenji

    DBenji Member

    Joined:
    Sep 20, 2016
    Posts:
    59
    Thank goodness. Was beginning to think YYG might abandon box2D because (apparently) so few use it. It's actually quite difficult trying to find information about how to use it properly on the forums and there also seems to be somewhat of a stigma against it - which is a real shame because GM's box2D offers way more performance-wise (when you're trying to simulate things like ropes for example) than creating your own physics calculations and running them every frame.
     
    Matt Hawkins likes this.
  5. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,698
    There has never been any stigma in the GMC against using Box2D, just a lot of ignorance in its best practices and also in basic physics theory in general.

    What there should be stigma against is improper usage of Box2D that constantly sets phy_position_x and phy_position_y HeartBeast-style.
     
  6. DBenji

    DBenji Member

    Joined:
    Sep 20, 2016
    Posts:
    59
    "Never" is a strong word. That would mean I need only find one occurrence to technically disprove your statement. But perhaps I'm confusing "stigma" with the tendency of veterans to discourage newbies from the using the system - which is still surprising considering how Unity devs encourage the use of rigidbody2ds and physics2d.raycasting to any newcomers.

    Regardless, I feel there has been a lack of resources on how to use GM's box2D properly. For instance, I've seen a couple members suggest using collision-checking functions like place_meeting with physics objects (instead of physics_test_overlap) is perfectly fine and useful, but the docs are completely silent on whether or not this is good practice.
     
  7. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,698
    You're completely mischaracterizing the reason why veterans make the discouraging posts.

    We don't have an issue with rookies using Box2D if they do it properly in an informed manner, and only on games that benefit from lifelike physics as opposed to cartoon physics (e.g. pinball, Angry Birds). The issue is that too many rookies start using Box2D with no theoretical background in physics nor desire to at least learn the basic terms. To make matters worse, their first exposure to Box2D is too often the defective "jump with phy_position_x and phy_position_y as though physics is off" technique from HeartBeast's RPG tutorial. It's easier to tell off these people than to hold their hand.

    With more formal, technically sound coverage of the physics system, perhaps the rookies will turn to better instructors and not have to be told off by Q&A responders for misusing Box2D in contexts where it has no place.
     
  8. Zhanghua

    Zhanghua Member

    Joined:
    Aug 3, 2017
    Posts:
    172

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice