From: Brett L. <wak...@gm...> - 2008-09-02 23:21:25
|
Sounds like an excellent plan. I'm rather happy that you've taken so much on. It would have taken me a lot longer to implement most of the things that you took on. :-) Here's how I'm envisioning the architecture: We need 4 main components: Client, Server, Game Engine, and Data Transport. These fit fairly well into the Model, View, Controller paradigm, which I'm happy about. I'm going to attempt to make everything as modular as possible to allow us to build multiple modules (e.g. Swing Client, and Web Client. Java Sockets, Jabber, SMTP transports, etc.). However, what this means is that we're going to need to get better about writing JavaDoc and being a bit more strict with our API definition so that we don't break things as we build additional modules. Right now, the biggest downside I can foresee is that _all_ clients must talk to the server over a transport, which means that even local games will have to load up the network bits and talk across the localhost. It's a minor amount of overhead, though. So other than the conceptual inefficiency, I don't think it's a major problem. The main requirement is that the Server will need two methods of startup: a command-line no-GUI method, and through the Options GUI for hosting a local Client and Server. For now, I've decided to just use the native Java sockets in java.net.* and java.nio.*. I'll push PBEM support off until the basic architecture is more fleshed out. My gut feeling is that real-time network play should be the higher priority because there are already workable PBEM solutions. I think that maintaining good component separation is going to require that we adopt Java's concept of events and listeners. We do that to some extent with the Observer objects, but I think it's definitely something that we can work on improving. ---Brett. > -----Original Message----- > From: rai...@li... [mailto:rails-devel- > bo...@li...] On Behalf Of Erik Vos > Sent: Tuesday, September 02, 2008 3:05 PM > To: 'Development list for Rails: an 18xx game' > Subject: Re: [Rails-devel] Starting on a client/server > > Hi Brett, > > I'm very interested to see what you will come up with. In all honesty, > Rails > has perhaps become a bit too much my own baby, and a fresh look way > well be > in order. You're also solving my dilemma on how to continue myself - in > the > near future I will now just keep adding more games to the existing > code. > > Of course, I have my own thoughts on how to achieve the client/server > split, > and as you know I have already been working somewhat towards it. For > instance, I think you would do well to reuse the PossibleAction > hierarchy, > to pass allowed and executed actions forth and back between client and > server (in some serialized form). On the other hand, the screen updates > via > the ModelObject/ViewObject hierarchies do not translate well; the > subclasses > can perhaps be retained, but the top classes need be redone as the > underlying Observer/Observable pattern must be replaced by something > completely different. I don't yet have a conceptual solution for that. > Although these are the main aspects of the client-server communication, > there is a lot more that I have not even started to think about (such > as > changes to the current player and phase). > > Anyway, I'll be happy to discuss such matters in more detail if you > like, > but perhaps we can then better do that off-list, to avoid annoying the > onlookers. > > I appreciate that you want to keep this new approach separate from the > existing code. Hopefully we can reintegrate later on. > > Good luck, > Erik. > > > -----Original Message----- > > From: rai...@li... > > [mailto:rai...@li...] On Behalf > > Of brett lentz > > Sent: Monday 01 September 2008 23:38 > > To: Development list for Rails: an 18xx game > > Subject: [Rails-devel] Starting on a client/server > > > > I just wanted to send a quick update to the list on new developments. > > > > I've decided to get started on a client/server version of Rails. It's > > been far too long since I actively wrote code, and I feel like I > > should be more actively developing Rails. > > > > I've been giving it some thought, and I think the best approach is to > > write a new architecture (mostly) from the ground up, rather than > > migrating our existing code into a client/server paradigm. > > > > There are several reasons why I want to incorporate refactoring the > > code into adding such a major new feature. One of the primary reasons > > is that it will give me a chance to revisit the UI, the hex drawing > > code, and many other areas of the codebase, and look at these things > > with a fresh perspective. It's also a chance to clean up and organize > > the code in ways that are difficult currently. > > > > One thing that I want to make perfectly clear. I'm absolutely not > > throwing out our existing code. > > > > What I _am_ doing is starting from a new, empty project directory on > > my workstation, writing a basic client and server, then slowly moving > > our existing code in, one piece at a time. During this process, I'll > > be cleaning up many areas of the code, and rewriting a couple of > > things from scratch. > > > > As soon as I have a basic framework, I'll publish a new module into > > CVS so that everyone can jump in and help get network play fully > > functioning. > > > > > > ---Brett. > > > > -------------------------------------------------------------- > > ----------- > > This SF.Net email is sponsored by the Moblin Your Move > > Developer's challenge > > Build the coolest Linux based applications with Moblin SDK & > > win great prizes > > Grand prize is a trip for two to an Open Source event > > anywhere in the world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > > ----------------------------------------------------------------------- > -- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |