tag:blogger.com,1999:blog-5052387.post3671281779453127726..comments2024-03-17T16:13:55.262-07:00Comments on Blobs in Games: Brainstorming with transposeAmithttp://www.blogger.com/profile/12159325271882018300noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5052387.post-2654557409046075572019-03-26T09:05:39.690-07:002019-03-26T09:05:39.690-07:00@Jan: YES, I first learned about this in the conte...@Jan: YES, I first learned about this in the context of programming languages (I was at Rice at the time with the people mentioned on the wikipedia page, and spent some of my phd years on that problem). I found that for most problems though, I don't actually need multiple dispatch; I only need to pick one of the two as the primary extension axis. I started noticing similar things in other contexts too. In games, for example, entity-component-systems, and in databases, the object-relational mapping.<br /><br />@Wouter: ah, interesting! I wonder if it's also in part because physical board games had cards and pawns etc as dumb objects, and game rules were being "executed" in the human brain.Amithttps://www.blogger.com/profile/12159325271882018300noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-73894665028105241902019-03-25T07:18:05.406-07:002019-03-25T07:18:05.406-07:00You run into a similar problem when you think abou...You run into a similar problem when you think about software implementations of boardgames. A logical design choice at first would be to create classes around all the game objects (cards, pawns, the board, ...) and put the logic in them where it belongs. Then you get to the nitty gritty details of the game rules and notice you're modifying code all over the place all of the time, and you realize it makes much more sense to treat the game rules as first-class entities (e.g. Classes), and keep the cards and pawns and all that basically as pretty dumb objects.wlievenshttps://www.blogger.com/profile/16162030556669130162noreply@blogger.comtag:blogger.com,1999:blog-5052387.post-16162842517095033762019-03-25T00:39:07.404-07:002019-03-25T00:39:07.404-07:00Hey Amit,
This reminds me a lot of the expression...Hey Amit,<br /><br />This reminds me a lot of the <a href="https://en.wikipedia.org/wiki/Expression_problem" rel="nofollow">expression problem</a> where you want to have an extensible object tree.<br /><br />On the one hand you want to add logic, and on the other hand types.<br /><br />There's some interesting solutions out there to solve this, but most of the time you'll need a programming language that supports multiple dispatch.Janhttps://www.blogger.com/profile/02929004799352869555noreply@blogger.com