Notes: README Alternative Universe 0.1 ------------------------ This is the first version of the alternative version of Universe (yes, it is a pun as well). This server is very different in structure from the older one. These are the main differences: - bidirecional communication: both the server and the client can send a request. The requests are called ClientRequest's and PushUpRequest's, depending on who started them. - stateless connections: easier, safer, lighter. The plan is to make a watchdog to 'ping' on clients every minute or so, and consider them dead if they don't respond (the player's civ keeps doing what it was ordered, until the player comes back). This will prevent starvation in case a player drops or his Internet conn has been terminated. - transaction-driven: all of the game's state is kept in a database (HSQL), but the objects are currently being accessed through Hibernate, which is a very easy JDO-like object-relational tool. This whole bunch of names means that if the server does something stupid because of some invalid situation (an invalid client sending an unexpected order and the server terminating the game), the game is not lost, it only returns to the last turn. Of course, you still have to eliminate the invalid client :-) - single-window, except for reports: having a lot of open windows gets to my nerves, so I build a simple tabbed panels for the main screens. I suppose the reports will still be floating windows. - has a customizable UI theme: no scripting, for now, but may be done later. I don't like the standard metal look and feel for a game, but if you want, it's only 1 line away! - client/server as separate programs: really separate, just like in free civ. The server interface needs a lot of work, though. The project already has about 2827 lines of code (NCLOC) and 1893 lines of comment (COM) divided in something like 100 files. The measures were taken using CCCC, but if anyone know a better tool please tell me! Things the client/server already does: -------------------------------------- - client connect, disconnect, reconnect - server sends a push-up to all valid players when the game has been terminated What does this mean? -------------------- - means that most of the infrastructure is done. There may be some bugs lurking, but until I find them I'll believe they are not there. What this does not mean? ------------------------ - means that there is very little of the game itself implemented. The interface needs work, and the requests/replies and their respective handlers need to be done. To install (both client and server): ------------------------------------ Unzip the files anywhere. Don't forget the directory structure: there must be a lib dir on the root after unzip. To run the server: ------------------ From the root dir of the installation: java -jar server.jar You must have a 1.4 JVM installed, I believe. To enter a command, just type it at the prompt. Yyes, for now you have to type it between the log statements. I'll change that when I have something I know people will use. It's not that hard, it's just not a priority when the real game is not done. Commands accepted for now: - create: creates a clean game and sets to accept new players - end: ends the current game (may be in the configuration step) - quit: closes the server, but leave the game data (will, there is still some unknown thread I can't find, but avoids the server from closing) To run the client: ------------------ java -jar client.jar You must have a 1.4 JVM installed, I believe. Check the bases! The game is not ready yet...
Changes:
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use