r/programminghorror • u/SocksOnHands • Feb 25 '26
Object Oriented Design: Pokemon
I don't know how to properly post a link to a video, but check out this over engineered, overly complicated and confusing design for an object oriented Pokemon battle system that can't actually support all the gameplay mechanics of a real Pokemon battle: https://youtu.be/CyRtTwKeulE?si=iZqoCPxjv1QU3ZJt
I don't have anything against object oriented design if done well, but when you start implementing classes for simple logical operations like AND and OR, you're probably going down the wrong track.
0
Upvotes
View all comments
Show parent comment
6
u/johnshmo Feb 25 '26
He made it pretty clear that what he is showing on the whiteboard is somewhat of a toy example. It is not a tutorial for how to make a Pokémon battle system. It is an achedemic exercise. Plus, it seemed pretty straightforward to me how the system could be extended to support multiple enemies, and attacks that target multiple enemies (he even mentions a few ideas in that regard).
In any case, a refactor like that would have some amount of friction, OOP or not. You'd have to perfectly predict all of your requirements from the get-go to avoid it.