If this was an accounting application this part of the program would be called the Business Logic, but fortunately for all involved this is not an accounting application. That means we get to call it Game Logic, I think that is about it.
What structure would be sensible for me to use to conveniently represent the actual Dark Forest game? The locations on the map, items, player characters, NPCs, stores and everything else. This all has to be easy to file into a database as well, because I am going to be doing a lot of that.
On the client side I am going to be using MVVM so I know that this is all going to be hanging out in the view model. I am not so sure how I should be separating my view model so currently I have one for the basic navigation screen, one to handle combat encounters and one to handle non combat encounters (currently stores). They expose my database records, currently with vairying levels of grace, to the UI.
This is constantly evolving and is probally due for some more refactoring.
I have a concept of a player charicter and a Monser, both of which are charicters on the screen. I think that they will probally both be refactored to share a common talbe that descrbes things on the screen, and perhaps another that holds records describing the properties of someone that partisipates in the combat event. The shared combat logic has an interface called ICombatant that probally is going to have the same properties.
No comments:
Post a Comment