It is currently Wed Aug 21, 2019 11:11 am

All times are UTC + 9:30 hours

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Server Jargon?
PostPosted: Sun Feb 08, 2009 6:36 am 
User avatar

Joined: Fri May 04, 2007 3:18 am
Posts: 520
Okay, there has been a lot of buzz about the server and what we should do with it, but first:

A little info about how the old cw1 server works... (Hopefully with confirmation from Urusan)...

First of all, the server is split into two parts. Java and Perl, each section deals with verification of data... but it is mostly connecting to the server that takes up most of the coding space. The key files for dealing with the server are these two.


Some documentation in
# test     - Test connection, return "success"
# qname    - Tests if a certain game exists, returns "yes" or "no"
# newgame  - Creates a new game by reserving the game name
# mpass    - Tests a master password
# join     - Registers a player with a particular game
# validup  - Checks if a player's user/pass is correct in general
# canplay  - Checks if a player's user/pass is the current player's
# getturn  - Returns the day and turn
# nextturn - informs the server that the next turn has started
# sendchat - puts a chat message in the game's .chat file
# getsys   - returns the contents of the system log
# getchat  - returns the contents of the chat log
# dplay    - eliminates a specified player

Some documentation in
 * Handles chatting to the server using plain text
 * Invalid input, commands and server error messages are wrapped in NetworkException
 * <p/>
 * The results of a command from the server is stored in this object and
 * can be retrieved by using getters.
 * @author stefan
 * @since 2.0

In order for the program to send the map file, it first verifies if all the data sent is correct. The data is read from the server at any time, which could be the source of all the mixups of text data. There is no way to see if all the data has been sent to the server before data is read. If anywhere is causing the problem, the root would be here... I think?


Anyway, there is only a few ways we can handle the new server. I'll name them here.

1) Put game information on the client. (cw1 server kinda)

-Most of the information of units, movement and so on will be downloaded on the client's computer. Server will hold raw data, like save files, and username password verification (basic text stuff).

-The game remains easily customizable.
-Server will be able to hold tons of information.
-No heavy reliance on other oop's and ipl's... (other languages in general)... to get a server running.

-Promotes cheating (especially this being an open source project)
-Possibility of lag
-Extremely unfriendly for FOW because of the ability to reload entire games

2) Put game information on the server

-Really fast smooth move-by-move gameplay
-Really difficult to cheat the system
-FOW friendly games

-Custom ability limited by server space/number of servers available.
-Can't do turns offline/ Must always be connected to server to do a turn.

Even though I am leaning 2. It'll also means that starting the game in a new language would be the wisest path for the game. Since Java is a little tricky when dealing with server information. Other languages are a little more straightforward and require less verification.

Erm, it'll probably be a wise idea to stick to a Java based system, since we are all mostly comfortable with Java.

Yeah, it isn't necessary to get a response here. But if you have any thoughts, you can post up.


Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 9:30 hours

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Blue Moon by Trent © 2007
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group