Jump to content

Should I use OOP for this??


cooldude832

Recommended Posts

If it's going to take a large amount of code, I would use OOP just because it makes it so easy to sort everything. I don't have much of anything intelligent to say as to why it's better to use OOP in this case. I just like using it when I'm programming something that could get confusing, and OOP takes all the confusion out. Thats just my two cents.

Well, it's ultimately your choice. If it's not going to take tons of coding, then you probably shouldn't worry about using OOP.

 

For a game like your doing, you could make it so you can use each function within the class work on both players. Without OOP, your going to have to have two separate parts of code for that. My choice would be to use OOP just because you are going to reuse each function more than once in your script, so it will greatly reduce the amount of code.

 

Again, I'm no professional with OOP at all. So if you want to wait for a second opinion, that would probably be smart.

I guarantee you taking the time to learn OOP and implementing it in your game will save you HUNDREDS of hours later on down

the road.  The development will take longer if you are starting out but once you learn the time spent later on down the road

cutting down on development time, making it easier to make code changes, and making new feature enhancements will

literally triple in speed if programmed right.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.