I have been making a tile (block) based 2D side-view game.
So far I have the basic rendering and world generation going. Each tile (block) has its own class for different actions or properties that block has. But I need a way to create these objects using a number.
So every tile (block) has its own id, and so I can use that id to create new objects. And for a inventory system.