Are there any advantages for OOP

Are there really any advantages for object oriented programming? it feels just uselessly overly complicated.

1 Like

Yes and no.

depends on how mentally sane you are

1 Like

#help-and-feedback:scripting-support

Yes. Object oriented programming will make your life tons easier. You’ll be able to work magnitudes more efficiently and in a more organized and modular fashion. ModuleScripts are a big part of OOP. You’ll see that in every popular library on the devforum, have modules in them. A couple I can think of are Datastore2, TopbarPlus, every admin system, they all have/are modules, and use OOP.

Once I started really using modules a year ago, by making a moduluar system, I felt like I skipped 2 grades and was immediatly a better and more efficient programmer. It made making games require less effort, and became better at the same time.

2 Likes

Generally the more complicated your game, the better suited it is to using OOP.

2 Likes

OOP is specifically very useful for core game mechanics like items. In most other cases you can use functional / ECS.

1 Like

I do have a clue really.
People do say it is slower, But It is easier to add on to.
And depending how its used you may be able to preload it in some way where it can be faster.

Which is why alot of community modules that want their people to add onto use OOP.

I don’t use OOP that much. But also When I did, it was usually for stuff that are going to have more information that can change than anything else, like it can be removed, added, or changed.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.