Thursday, 14 March 2013

Item class design

Item class hierarchy is divided into three layers: main class, item datatype and subtype datatypes. The main class is almost ready actually, only trap handling is undecided. Item datatype is the main class for data-driven section of the whole system. But the interesting stuff happens in subtype classes which now are under heavy development. Data-driven approach is something that is not only modular, but it also creates a kind of order in programming which I find helpful.

Some subtypes are already there, but I think most of the subtypes need a dedicated class. In fact many parts of the item system is still unfinished, but subtype classes are very similar to each other and it's quite easy to create them from technical point of view. The difficult thing is the game design in them. What properties items have? How you can use them? Things like that.


  1. Sounds a bit too complicated, why not to use a component system?

  2. I don't get components. A class IS a component. No matter how you do it, you still need that data for items. I don't think this is complicated, I think component system would be more complicated than this, because this is a clean class hierarchy and these low level data type classes can be used anywhere, they are completely modular classes that contain only raw data.