|
|
|
|
|
by brewmarche
1589 days ago
|
|
Your event approach reminded me of Eric Lippert’s blog post: https://ericlippert.com/2015/04/27/wizards-and-warriors-part... He also ends up with the commands/actions/events/rules (basically emphasize relation over object) as main types in an interesting[0] example of a rule-based game. One of my issues with “mainstream OOP” (at this point I’m not even sure what “real” OOP is) is that it apparently tempts people to base their models around objects and subjects not verbs. I’m not sure if it’s due to prevalent nominal type systems or due to how we traditionally teach class hierarchies (dogs/cats <- animals) but I think centering the model around predicates and relations works much better. [1] [0] Interesting because while it is a toy example it is one that could be real; not like examples with cars and animals. [1] Just reminded me a bit of Wittgenstein’s Tractatus; didn’t want to get too philosophical but I think the ontological views we have influence this kind of modelling a lot |
|