• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Discussion Is GMS2 OOP?

T

Tomkeen

Guest
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.
 

Kyon

Member
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.
Yes.
But it's optional I guess.
 

FrostyCat

Redemption Seeker
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.
 
S

Storyteller

Guest
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 by a moderator:
Top