c# - Need advice on design/structure of a game -


i posted on gamedev.stackexchange haven't received answers. here able me this.

i working on first game in c#. it text-based game using windows forms. brainstorming on best way manage of data , thought containing of information relevant instance of game in 1 class (game.cs) , have class responsible keeping track of important. (note: not talking having project 1 class or that) figure make saving , loading easier (simply save , load instance of class), making starting new game easier (currently i'm initializing of variables in initialization class).

so, method in practice (having game needs keep track of in single class)? if not, there other way might suggest handling , placing data?

you're close arriving @ mvc pattern on own.

so call game.cs "model" , contain information relevant state of game. form's job display current state of game game state modified. (maybe event driven updates form?) hookup whatever actions player take through ui controller. controller's job provide methods take actions , manipulate game state based on actions. e.g. moveright() update game.position.x.

you can take whole game state , save/load, intention. don't see problem you're trying do.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -