When and when should I not create classes in my game?

I’m having trouble with knowing when I should be create classes for stuff like the title suggests.

Let’s say I wanted to make a tower defense type game, would I make classes for towers, the guns of those towers, the effects for those towers, etc?

It feels a bit extra when I have like 30 modules scripts for just ONE system.

I know that I don’t need to make modules scripts for every system but I just need to know when it’s necessary or not

1 Like

It depends! With classes, you game will be more easy to edit and add new updates or code changes.

1 Like

Thanks for the reply! Is there any way you’d be able to provide details about the tower defense example I was inquiring about in the original post? Thanks!

nevermind, you are making a tower defense game.

i recommend you make the character design first, put it into the game, and then work on their abilities and them animations.

1 Like

Sorry for the late reply, okay let me try to explain in detail what I need assistance with:

If I was making a tower defense game with a Tower class, how many module scripts would I have to make to pair with it?

For example: a Gun class or a Special Abilities class

Anything substantial that doesn’t need the self variable of your tower should probably be a new class

1 Like

Thanks! This is gonna help me a lot!!! :smiley:

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