[REQUEST] Base objects that other objects can inherit from

So, this topic did give me this idea:
https://forum.gdevelop.io/t/is-there-a-way-to-copy-paste-behaviors/25375

It is indeed can be a pain when you need to add the same behaviors and set the same properties to hundreds of objects.

So the idea I am proposing is that, we could have Base objects in GD that is basically an abstract object that we can not create instances of in our game scene. What we can use them for is to create other objects that inherit from this base abstract object.

We could have a base object that hold common properties like object variables, their initial values , behaviors and their properties and then we could say that in the IDE to okay create a Sprite object but I want this Sprite object to inherit from this Base object and so, it would inherit all the variables, values and behaviors and it properties from that base object.

We could create hundreds and thousands objects inherit from the same base object and so later if we want to change something and add one or more behavior to hundreds of objects or change a behavior property, we can simply edit only this base object and all other object inherit from it would be effected. Same goes for variables. Could also have Base Sprite objects and Base Text objects and so on to be able to also inherit type specific features too like animations, text size…etc

Objects could of course override inherited properties so in case we want an object to inherit everything except a value of a variable or a property of a behavior, we can change that for that single object and it would be no longer inherited and when we change something in the base object after, it should not effect the one override it of course, so need to implement some smart algorithm to help us here.

Let’s share some thoughts on what sort of properties would make sense to be able to inherit from such base objects and how it should work, or just thumb it up if you think it is sounds good or thumb it down if you think it is nonsense we don’t need this :+1:

1 Like

basically make the engine go full OOP. I think a better way would be to mass set properties. Like you put many objects in a group then can say "edit that property on all objects in the group. Your idea isn’t bad in itself but it might make many users confused and may make things too complicated

1 Like

Am, to go full OOP would require a few more things, but yes the goal is to mass set properties for selected objects. That could work too. :+1:

1 Like

Yes mass setting properties and behaviors is exactly what I need