1. Hey! Guest! The 34th GMC Jam will take place between August 22nd, 12:00 UTC (Thursday noon) and August 26th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

Discussion Is GMS2 OOP?

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Tomkeen, May 16, 2019.

  1. Tomkeen

    Tomkeen Member

    Joined:
    Apr 27, 2018
    Posts:
    20
    Hey guys. I have question and no time for google this (even it could be faster). I have to know, if is GMS 2 OOP and what exactly it makes OOP. Btw, we never learned about it , so I have no idea how can I know. Thanks for response and sorry, if it makes you mad or something like that. Its just another spam from lazy guy, i know.
     
  2. Kyon

    Kyon Member

    Joined:
    Jun 27, 2016
    Posts:
    467
    Yes.
    But it's optional I guess.
     
  3. Tomkeen

    Tomkeen Member

    Joined:
    Apr 27, 2018
    Posts:
    20
    Thank you
     
  4. breakmt

    breakmt Member

    Joined:
    Sep 13, 2016
    Posts:
    168
    Yes, but not in full meaning. For example, it lacks of encapsulation.
     
  5. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,320
    Calling the current version of GML "object-oriented", just because there's something called an "object" and it has basic inheritance, is naive and superficial.

    The main motivation and characteristic of OOP is formally binding operations to types, and this formal binding simply doesn't exist in the current version of GML. You can tell this in GML by how the subject is often one of the arguments to a script or function, instead of being an actual host of that script or function. Until the 2020 OOP update happens, GML is just a procedural language, not a genuine OOP language. And even then, it will take at least another year to transition the remaining engine-level procedural code to OOP form, if YoYo decides to do it at all. It'll likely end up in a state like PHP, where genuine OOP practices coexist with non-OOP procedural practices.

    I just wish that people who have no foundation in programming language theory or experience with an actual OOP language would stop trying to answer this "is GML an OOP language" question. Most if not all of the "yes" responses I hear come from non-professional voices, and it's misguided to make those canon.
     
  6. Storyteller

    Storyteller Member

    Joined:
    Jul 19, 2016
    Posts:
    251
    standard C is imperative, 'procedural', yet can be used with OOP.
    There are several books and websites that discuss methods for doing so.

    Many in the industry find 'OOP' to be 'OO-Overrated'.

    Another similar paradigm/method that should be considered is 'ECS' for 'Entity-Component-System' which is valid for much of GMS2.
    You have many components, paths, sprites, 'objects', scripts (which may be compositions of other scripts) that are used to create an 'Entity' or GameMaker 'Object'. These interact based on systems, the phyisics systems, the particle systems, the collision detection systems etc.

    ECS is different from OOP largely in that in ECS something 'has a' instead of being classified as 'is a'.

    Personally, I am leaning towards ECS in most of my work over the OOP mindset, which to many, is confusing, far from intuitive and makes programming harder. OOP was a huge buzzword in the late 90s, and the marketing and propaganda drove a lot of people to it. In a large production house, such as say 'Big Accounting Software Inc.', where you have dozens, or hundreds of programmers working on the same software, OOP can help keep one team from interfering with or 'breaking' another team's code. Even there, it is often ridiculed.

    'Object' in GM, means 'a thing' and GMS2 really, is much closer to the ECS paradigm, than an OOP one.
     
    Last edited: May 16, 2019
  7. Tomkeen

    Tomkeen Member

    Joined:
    Apr 27, 2018
    Posts:
    20
    Thanks to all of you
     

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