0
Answer

OODesign for Gaming Solution

Steffon Scott

Steffon Scott

11y
1.1k
1
Hey guys and gals, I just had a quick question in regards to design practice for a game I am working on porting to C#. I am basically just going into the original C code and fishing out the algorithms for the main game functions (i.e. battle, quests, etc) then re-writing them the best way I know how in C#. Thus far I have gotten the Player class, Army class, Battle class, Item class, Unit class, Menu class, PlayerDB class, and a helper class. And the hierarchy of the objects I am instantiating is as follows:

-Player objects contain one army object and a List of item objects.

-PlayerDB contains a List of all the Player objects and the methods for basic (not specifically related to gameplay) player manipulation [add/remove/copy]

-The army object inside of the player object contains a List of unit objects and methods to manipulate armies in regards to combat and formations etc.

-The battle objects are created on the fly as needed and thus far, for lack of better understanding, I just make the calls from the menu object since this is the UI for my testing.

-And finally the Menu object is created in the main function of the program to throw me into my menu.

My questions are these: 

The game objects needs to be manipulated on a global scale, for example a new season begins to replenish player movement points at set intervals every couple of hours and this involves calls to each Player's method houseKeeping(). As well as global functions that control the weather in the game environment with pseudo-random algorithm. *SHOULD I have a specific Game object that controls everything in this respect and contains all the aforementioned items.

And my second question is that being that I would like to add some web accessibility to the game, since it is originally written for an IRC platform. ARE there any considerations I should look at to avoid too much pain down the road? As of now the interface with the user is just a command prompt menu but I hope to do some integration into ASP.NET C# for a nice web game. 

Sorry if my questions are to broad, if they are let me know and i can try to narrow it down. any help would be appreciated!