YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
15 stars 8 forks source link

In Object Editor, add a dedicated "Method Definition" option #3696

Open iampremo opened 1 year ago

iampremo commented 1 year ago

User request message on ticket [Ticket #185803]

 

Feature Type: feat_addition_ide Description: Right now, Objects have Variables, and can be defined in Object Editor in "Variables Definition", and can be defined, given value, and overridden by child objects.

With 2.3 update and the introduction of "Method Variables", "Object" in GMS2 has became more and more like "Class" in traditional programming language.

What if we can define methods in Object Editor, similarly in an area called "Method Definition"? And methods can be defined, written, and overridden by child objects.

With this feature, working with Object in GMS 2 are much more elegant. Object will have Variables, Methods and Event.

Of course, right now we can define Variables and Methods in "Create" event, but his approach is neither ideal nor elegant. "Create" event should remain as a place where the initialization happens, instead of defining what variable and methods the object has. If we do all the initialization in "Create" event, it will eventually become like a plate of scrambled eggs. Benefit: Greatly improve GMS2 and GML consistency. Greatly improve project workflow and asset management.

tgalluzzo commented 7 months ago

Hear hear! This would be the biggest improvement I could think of for using GML in Gamemaker. I feel the need for better definition and management of methods for objects everyday. This would be much much better than creating a messy Create event with a lot of method definitions in it.