Wednesday, 24 August 2016

Avoiding work

I've tried to pick up development again, but it feels hard. When looking at a particular piece of source code all there is left is work... especially in game design. Not so much in technical implementation, but some of that is also needed. It may sound funny when I'm referring game design as work, but that's how I feel when I'm comparing it to "pure" programming (without creating game content).

Working is kind of boring when you don't get anything out of it, at least not money as in this case. I'm often wondering why I'm even doing this, because I don't like playing as I used to like when I was younger. Maybe the explanation is that it's became a strange kind of habit. I bet if I tried to quit it would feel like there is something missing.

Today I was checking out item code. It showcases the problem of getter/setters in class based programming, but it's just how it is. Sometimes you could in theory create methods that sit well inside a simpler datatype class, but most often you need to get pieces of atomic data and make determinations outside that class. Either way the stuff gets done and no one is giving you points from better OOP style.

Problems in item code are mostly related to classification of items and using item type to check out some properties. It's not a good idea, because you could add some new item that has the same properties, but would not get recognized by the game as that kind of item. In large systems you need to classify everything to a larger group of items, whatever it may be. Then use the group's data to detect item types in more abstract level.