Designing a server application
Posted: 13 Mar 2011, 19:20
I'm getting lost trying to structure my game's server application so that it will actually do something. Maybe because it's not simple, maybe because my mind is just going nowhere.
I need to keep track of each Player, all their Characters (currently just three per Player) and Decks, the currently active Character, the game phase, and numbers/types/elements on the stack. (I say "stack" just in case, but it's probably just one at a time.)
I also know I need to set up programming Events for just about all of the game events, and some way to send the messages and game state over to the client apps. (The client app itself will probably come pretty quickly after the server is finished, but if not I'll just ask more questions.)
I need to set up rules enforcement, but I think I can do that on my own, once I have the rest in place.
Most importantly, I need to set up network communication between the server and future client. It would probably be preferable to be using Sockets, and it definitely needs to be an asynchronous communication method. I also have to be able to transfer XML and (possibly) images over between the client and server. (I have decided that due to the intense nesting of classes and lists I'm currently using, JSON is impractical, if not impossible. As far as researching with Google goes, finding theory is easy, finding understandable practical application is hard.)
And for all of this, I need to do it in Silverlight-compatible C#, while still allowing for "native" .NET clients. (Thus, Lidgren is out.)
I know I'm asking a lot, especially with the language restriction. But I keep putting myself in over my head with all my ambition and I need the help. Even if you can just help with the network code, it would help a lot.
I need to keep track of each Player, all their Characters (currently just three per Player) and Decks, the currently active Character, the game phase, and numbers/types/elements on the stack. (I say "stack" just in case, but it's probably just one at a time.)
I also know I need to set up programming Events for just about all of the game events, and some way to send the messages and game state over to the client apps. (The client app itself will probably come pretty quickly after the server is finished, but if not I'll just ask more questions.)
I need to set up rules enforcement, but I think I can do that on my own, once I have the rest in place.
Most importantly, I need to set up network communication between the server and future client. It would probably be preferable to be using Sockets, and it definitely needs to be an asynchronous communication method. I also have to be able to transfer XML and (possibly) images over between the client and server. (I have decided that due to the intense nesting of classes and lists I'm currently using, JSON is impractical, if not impossible. As far as researching with Google goes, finding theory is easy, finding understandable practical application is hard.)
And for all of this, I need to do it in Silverlight-compatible C#, while still allowing for "native" .NET clients. (Thus, Lidgren is out.)
I know I'm asking a lot, especially with the language restriction. But I keep putting myself in over my head with all my ambition and I need the help. Even if you can just help with the network code, it would help a lot.