
*** GENERAL ************************************************************

- Switch to the usage of the ZoneMgr::Systems map instead of reading file on demand
- HOW the hell can we assign serials to bases, planets and stuff and having the same on client/server sides
- Prediction : predict when receive ClientState on server and then one time again when received on other clients
               how can I compute positions between 2 updates with interpolation ?
- Wait for DloadMgr buffer to buffer download support and use it to transfer webcam captures
- Use crypto++ lib to implement comms encryption
  - TO TEST with RSA
  - with blowfish
  - with 3des
- LOW : Complete jVoIP support
- PortAudio : tune MAX_PA_CPU_LOAD when support is complete
- About NetworkCommunications : assign a different freq range for each faction ?
- NOTE : network communication system is only working when 1 local player
- NOTE : Only client with crypto can connect correctly to a crypto server and vice-versa

*** ACCOUNT SERVER *****************************************************

- BUG : continuous loop when gameserver connects to accountserver
- BUG : when account already logged -> game server fails to send info to client
- In client-to-acctserver mode : Handle case where player has no server affected yet

*** GAME SERVER ********************************************************

- Script call unit : broadcast a message to starsystems' client to make them create units created in script_call_unit.cpp
                     add the created units in the zone's unit list
- When testing timed out clients if we never received a position update it might be a problem
- Fix ping computation
- Depending on ping -> send the player its own info in order to update himself periodicaly (like 1 time per 2 or 3 seconds)
- Add a timeout between the time the player logged in and the time he really enters the game
- Add options to server keyboard control : KILL A SERVER UNIT, KICK A PLAYER, SEND A PLAYER TO JAIL SYSTEM, SEND ADMIN MESSAGE TO PLAYERS...
- Sometimes in the future : make admin server settings with :
							- no AI wingmen for players
							- do not allow players' capships

- Think about transfering config data such as difficulty, physics...

TO TEST - Check the detlatime we have to send in clientstate (broadcastSnapshot)
TO TEST - try to reconnect to account server periodicaly if connection lost
TO LOOK AT - When receiving a packet : look at timestamp and compare it to latest receive timestamp for that client


*** CLIENT SIDE *********************************************************

- Take damages into account and put some interferences on webcam pictures
  - replace one image on 3 or 5 with blank noise picture
  - scramble one sound buffer on 5 or 10
- Should wait for CMD_ADDEDYOU just before entering in the main game loop
- Interpolate(extrapolate) using delatime + the concerned client's current_state delay
OR
- Maybe send extrapolated position with deltatime ahead in time
- and when receiving position updates extrapolate only with concerned client's delay
- Make client ask each .txt files containing planet, stars, ... textures someday
MAYBE NOT - Make webcam capture size part of config file (and later part of server config, not client anymore)


=== GENERAL STUFF =======================================================

DONE - Check for netbuf.get* in conditionals -> SHOULD NOT BE IN CONDITIONALS !!
DONE - Use crypto lib classes instead of the 2 md5 files I'm using now or use sha1
DONE - Netcomm : Add support for secure channels (encrypt with a key every data send on those channels) add encryption stuff
DONE - Add text message support to NetworkCommunication class : displaying message has to be added
DONE - PORTAUDIO : add calls to Pa_CloseStream in DestroySession
DONE - Server must be aware of webcam and portaudio client abilities
DONE OK - Check if I really send path relative to datadir with filenames to download
DONE - Implement a download manager -> Carsten is on that one
DONE - When client starts server send galaxy filename with md5sum or other check system
	if client has the file and the same md5 -> ok
	if not server sends the file content and client writes it
DONE - Do the same for starsystems at enter time on clients side (even if  starsystem has already been loaded once to check for manual changes)
DONE - Add tests in netbuffer.cpp in order to avoid any segfault (only when the protocol gets stable enough)
DONE - Move the GetUniqueSerial use from accountserver to vegaserver
DONE - In NetBuffer : turn string size into a u_short instead of int (and assert no string length > 0xFFFF
DONE - Take a look at RegenShield() and RegenArmor and network enable them
DONE - Add the player faction to SaveGame
DONE - Carsten - Compress sent data in Packet (_packetmem member)
DONE - Consider handle damages to docked ships if they can be hit
DONE - split asteroids, enhancement, building, nebula into 2 classes
DANIEL DONE in endianness.cpp - add htond and htond for doubles : they are completely reversed
DONE - Remove the isPlayer function and related data

OBSOLETE - Maybe send the unit radius in some way to the server so he can approximate if we can see other clients
DONE - make first login packets more reliable and stopping the game when fails (use a loop)
DONE - create configxml.* to handle VS server's configuration file (TIMEOUT, number of clients...)
DONE - remove "SERIAL" from accountxml
DONE - think about sending a warning to the account server from the game server when a client is disconnected
DONE - Add a networked boolean in the Unit class with a SetNetworkMode() method to set networked=1
DONE - Problem on old_microtime (not initialized) when sending first packet
DONE - Send a delay var in Packet for client->server delay and then timestamp from server->clients
NO BECAUSE DEFAULT TO ZLIB - Put some negociation stage to check that client support zlib


=== ACCOUNT SERVER ======================================================

DONE - Web-based account creation enhancements : fully create an initial savegame
DONE	- has to read faction.xml
DONE	- has to know about a few basic ships (specified by hand ?)
DONE - Load whole system description when generating a system (if not already done)
DONE - Compress the save files before sending them to game server
DONE - Then transfert unit description with login acceptance
DONE - Fix the bug when transmitting name for disconnection ??
DONE : made a StarSystem::Update() method for server - Move StarSystem::Loop to server side
DONE - Move to server side UpdatePhysics function from unit_physics.cpp
DONE - Turn Client::game_unit into a UnitContainer
DONE - Implement removeFromStarSystem ? and Destroy in Unit class
DONE - add a timeout test if !ingame with a second timeout much bigger

=== GAME SERVER =========================================================

DONE - Remove unit from star system when docking and add it again when undocking
DONE - netserver_devices.cpp : broadcast CMD_JUMP
DONE - Redo jumps :
  - client asks for a jump and do nothing
  - if client receives a CMD_JUMP ok then it tries to jump (if ok on server should be ok on client)
DONE - Associate serial by replacing strings in .system files (replace "<Planet ", "<Nebula", "<Unit ")
DONE - Add a check just before loading a unit from xml save and loading savegame to check data files for saved ship exist
   if not just deny login and output error on stderr
DONE - In savegame : add stardate loading and saving stuff to dynamic universe
DONE - Handle docking with CMD_DOCK and CMD_UNDOCK and DockToSavedBase on server side
DONE - When a request to jump -> check if the destination is reachable by origin system with UniverseUtil::GetAdjacentSystems()
DONE ANOTHER WAY - Add a check for player jump energy when a jump request arrives and send back a CMD_ASKFILE with packetserial = 0 if not enough
DONE - Put back a control with keyboard to be able to SAVE, SEE MEMORY USED...
DONE - Add position stuff transmission for other units than clients (ai, missiles)
DONE - Make the difference between ships/ai and planets/bases that move really slowly so updates are not required that often
DONE - In UpdatePhysics : do not modify physical_state for a client ! only for server side units (SHOULD BE OK IN UpdatePhysics2)
DONE AUTOMATICALLY - When another player is targeted, get his data (damage level, shield, weapons if we have the appropriate sensors)
DONE - Each time a ship is hit => send to all clients in the same zone a damage notification
DONE - when server savetime comes, send unit xml to account server for each client
  compressed? in a single packet with serials or names
DONE - Load StarSystems on demand (when a player enters an empty starsystem)
DONE - forsee account server unavailability and in that case, deny new logins + send msg to client

=== CLIENT SIDE =========================================================

DONE - Add a VDU text in network VDU to show if current comm is secured or not
DONE - Remove time compression in networking
ELIMINATED - BUG : do not broadcast when orientation changes
DONE - Find the jump call and make it only send a jump request to server
DONE - Check if we received position info about us -> ignore
DONE - Add the detection ov Video For Linux or Quicktime in configure.in -> if no present disable webcam (add a NETCOMM_NOCAM const)
MADE POSSIBLE - Ask directly account server for authentication and get serverip/port to connect to
DONE - Write the function that receive damage snapshot
DONE - Do not maintain ClientStates anymore -> maintain Unit members directly
DONE - When receiving position update, test if local player
DONE - When receiving a packet : look at timestamp and compare it to latest receive timestamp from the server
DONE - when one exits from VS -> send a quit msg
DONE - Use a NETWORK_ATOM to check if it's time to send position update

External libs URLs :
PortAudio : http://www.portaudio.com
JVoIPlib : http://lumumba.luc.ac.be/jori/jvoiplib/jvoiplib.html
Crypto++ : http://www.eskimo.com/~weidai/cryptlib.html
POSH : http://www.pyrogon.com/poshlib/index.html


CRYPTO SUPPORT :
- For RSA and other encryption methods that needs key files, the files must be in VS datadir/
