Page 1 of 1

Poor OD high level abstraction ?

PostPosted: 15 Apr 2012, 22:08
by paul424
I am tired , after rewriting code for sevaral hours Today. I tried to OD code base from /* typedef std::map<std::pair<int, int> , Tile*> TileMap_t; */ to Tiles** for Map representation.

After sticking to fixed size 800x800, reading the the hard coded coordinates from Test..level of Tiles to GameMap and properly shifting to some non negative values ( like xx+=400 ) , i went for to Rooms , Creatures etc. ...

But after all as I see those coordinates are used directly in Ogre::Vector !, when sending object to graphical pipeline .... arght !
If only it was abstracted like Model View Controler, just not to mix those coomponents data ....
Get to go sleep, will try tomorrow , I wait for some comments and advices ... :) .

Re: Poor OD high level abstraction ?

PostPosted: 16 Apr 2012, 00:02
by oln
What do you suggest the structure should be?
We already decided to use the observer pattern to some extent, but I agree that more decoupling of entity data and functionality might be a good idea.