What's a good way to practice object oriented programming

i dont really know if this is the correct category but here goes

hi there, i’ve been learning how to do object oriented programming recently, and i’d like to practice for when to use it, how to use it, and other stuff like that, but i dont really know how to. do you have any ideas on how i could practice it?

1 Like

hey there, what i meant was that i already learned object oriented programming, i just needed like challenges and stuff so i can maybe understand how i could use it in future projects.

Not too sure how skilled you are with OOP, but I suggest trying something like rewriting existing scripts to use OOP principles. You could also work on small projects or review code from experienced developers to see how they implement OOP.

OOP is mostly code organization so you can practice with whatever you are interested with.

For example make a car, then make a plane, then make a car plane, then make a car plane with a turret.

For a movement system you can add running with acceleration, then you can add dashing, then you can add spiderman webslinging.

The key is expandability and having these seperate systems work with each other.

Here is an example project where I practiced OOP with custom movement.

make a module script that handles bullets for guns. create the bullet with the metable and you can call a function to destroy it and move it .