bjornharrtell/wastelands — Issue #32: Refactor vmlayer to avoid generic type at Game level
Author: bjornharrtell
Created: 2012-01-30 09:03:39+00:00
State: open

Generic type at Game level will soon make everything generic and it's a pain.

Perhaps it was wrong to have the game strictly dependant on a vmcontext. An idea is to use observer pattern and have the context listen to the relevant observable parts of game, i.e render events. I still think the game should have most of the logic so that a screen needs to know its dimensions and so on but it should be enough with relevant metadata. Resources should be indentified by id catalog instead of platform dependant object references (which is the main reason for generics as it is now).